Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

  • Newbies

Greetings All

 

I am looking to add a line into the following code into the 'prepare payload for client' section to select only records that match the following criteria

  • I have a variable set called: $additional_settings
  • The field that needs to match with $additional_settings is called _kf_uuid_companys

the code that i have already is as follows, i need to add a line into this code to pick records where the field _kf_uuid_companys matches $additional Settings.

Any help would be greatly appreciated:

 

"SELECT "

& $dyn_sql & ", '"

& $$record_delimiter & "'"

& " FROM \\"" & $sync_table & "\\""

& " WHERE " &

 

 

 

// Exclude records flagged for sync exclusion.

"( COALESCE ( BS_Exclude, 0 ) = 0 ) " &

 

 

 

 

// If the client is merging new/updated data with data already on the device...

// Only include records that have been added/updated since the last pull...

// And only include data that they did not just push (i.e. no "round tripping!")...

 

If ( ( $$sync_method = "Merge" )

and

( $last_pull_utc > 0 ) ;

 

"AND ( BS_UTC_Time > " & $last_pull_utc & " ) " &

 

"AND ( COALESCE ( BS_Device_ID, 'X' ) <> '" & $client_persistent_id & "') "; "" )

Hey, try adding this line (including the quotation marks) at the end of your SQL statement: "AND ( \"_kf_uuid_companys\" = ? )" Please note the \" around the field name--You'll need these since your field starts with _. Then include $additional_settings as the argument in your ExecuteSQL calculation like so (See attached image).

Alternatively you can embed the variable right in the SQL text: "AND ( \"_kf_uuid_companys\" = '" & $additional_settings & "' )"  

5907833beeb8e_ScreenShot2017-05-01at11_49_01AM.png.51a0f0f9c433f3a5f1a8c5071534791d.png

 

P.S. This doesn't matter at all, but I believe it's spelled companies. ;)

 

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.