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

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

Recommended Posts

Posted

Here's what I'm trying to accomplish in a script:

-Import data into FILE B from one record in a found set in FILE A.

-In order to import only that one record, I am *omitting* that record in FILE A and then using the "Show Omitted" script step. The ensuing Import Records step then correctly imports only that one record.

What I can't figure out is: At the end of the script, how do I then go back and restore the previous found set in FILE A to the exact state it was in before, sorted in the same order as before, and make the 'omitted' record the current record being browsed? Hope that makes sense. Any suggestions greatly appreciated.

Posted

If you don't have too many records in the found set, the Copy All Records script step can be used to copy the IDs of the found set, which can then be stored in a global. Then a Go to Related Records [ Show ] step on a self-join relationship from the global to the ID should produce the correct found set. You would then use one more GTRR on a self-join from another global LastID to ID relationship to navigate to the correct record.

See my demo in this thread:

http://www.fmforums.com/threads/showflat.php?Cat=0&Board=articles&Number=101576

The size of the found set you can remember with this is limited to maximum number of characters allowed in a text field (something like 64,000 characters, or a few thousand records depending on the size of the ID.)

Posted

Another approach would be to pass the data from A to B via global fields. If there are only a few fields that would be easy enough. If there are a lot of fields, then set a global in B to the primary key of A, and make a relationship in B from the B global to the A key field, then set the fields in B based on the relationship.

This topic is 7160 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.