Skip 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.

Having a script wait for results

Featured Replies

I have a script that importing records from via ODBC. It is a SQL database. Basically, I need to populate some subfields in another table based on the query results. A simplified version of the query would be "Select * from teacherdata where StateID = FMPDB:stateid" The script runs through the records in table A (which includes a value in the stateID field) and populates table B with the results of the query. I'm basically pulling down 1 record at a time from a secordary database.

My problem is that Table A has 1491 records and after a successfull run of the script Table B only had a little over 1300 records. My guess is that the query didn't return results before the script advanced to the next record and sent another query.

Is there a way to have a script wait for the results to be returned from the query before going on to the next step?

Thanks.

Edited by Guest

Could you use something like:-

Loop

Exit loop if IsValid(A to B relationship)

Pause 1 second

End loop

You might want to add a counter to the loop to exit the loop after say 20 seconds

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.