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

From a main file I have a script that initiates and import script in an archive file for a specified table in the main file. I need to move to a new table and repeat the import from the archive file. The concern is posible conflict if the first import process is not completed. Is there a way to insure the import is completed before the main scrip initiates the next import? I'm considering using a fixed delay in the main script. But that is no guaranty. Can the script in the archive send a resume trigger when it completes its import that tells main script to continue? Also can I pass a script parameter such as a table name from the main script to the archive script?

Regards,

Jean

Two scripts cannot be actively running at the same time. So I think you have nothing to worry about regarding two imports happening simultaneously or overlapping. Just do

Perform Script ["Import script 1 in Archive file"]

Perform Script ["Import script 2 in Archive file"]

etc.

You can pass a table name parameter, but how do you plan on using it? You could probably do a loop in the Archive file like

Go to Layout [Layout number by calculation: Let( L = Get(LayoutNumber); L/L )]

Loop

Exit Loop If [Get(LayoutTableName) = Get(ScriptParameter)]

If [Get(LayoutNumber) = ValueCount(LayoutIDs(Get(FileName)))]

{bad parameter; put error result steps here}

End If

Go to Layout [Layout number by calculation: Get(LayoutNumber) + 1]

End Loop

  • Author

Its clear that within a single file multiple scripts cannot occur. However does this also mean that FM treats a script initiated in the external file is like a sub-routine. Meaning the next step in the main script is not executed till the script in the external file is completed first.

My plan is to do the following.

Go to layout 1

Find [define found set of records to be archived for table1]

Perform Script ["Import script 1 in Archive file for table 1"]

Go to layout 2

Find [define found set of records to be archived for table2]

Perform Script ["Import script 2 in Archive file for table 2"]

etc.

As long as FM will wait till the script in the Archive file is completed before I move to find the next set of records I should be ok, right? Thanks for your feedback.

If sub-scripts did not complete before the next step was executed, most of my solutions over the past 5 years would be screwed. So I would think you have nothing to worry about. Someone else may be able to provide concrete documentation from FMI regarding this though.

  • Author

I'll take experience over a manual any time.

Thanks

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.