Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7089 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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

Posted

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

Posted

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.

Posted

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.

This topic is 7089 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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