mickeyfinn Posted December 19, 2007 Posted December 19, 2007 First, here is the situation I'm in. I have a table which contains a duplicate record script. When the user dupes the record, the duplicate does not automatically end up as the last record in the set, which is causing confusion with the users. Users create a found set on any criteria. I need a script that will add the duplicate to this found set as the last and current record. I have built a script that uses the GTRR script step in a new window to create the dupe, then sets the record ID as a variable. I was hoping to simply close that window and use extend found set to add the new record (which by default will add it to the end of the found set), but I can't use a variable (or even a global field) to search by. I'm aware that this is normally side-stepped in normal finds by Enter Find Mode/Set Field/Perform Find combinations, but Extend Found Set does not seem to replace Perform Find in this set up. In desperation, and only as a temporary measure, I have set a temporary field to a predefined value when creating the dupe and then extended the found set by that value, which works but will quickly cause problems in a multi-user environment (FM Server 7). I have read up in previous posts about different methods of saving the found set, and may be open to trying using a gathered list of record ID's with the new ID added, but was unsure of how to find from a list like this. This method may also help with other found set related scripts I have written elsewhere incidentally. So I'm in a bit of a pickle. Can anyone help me out? Thanks in advance to all who reply.
Colin Keefe Posted December 19, 2007 Posted December 19, 2007 You've got the right idea. Are you doing this after getting your new $RecordID? ... Close Window [Current Window] Enter Find Mode[] Set Field [table::recordID; $RecordID] Extend Found Set[] Go to Record/Request/Page [Last]
mickeyfinn Posted December 19, 2007 Author Posted December 19, 2007 Yes, that's it. For some reason, when I was testing with Extend found set like that, I couldn't get it to work. I tried again just recently and it worked. Go figure. It would still be interesting to see what other techniques there are for storing and retrieving the found set. I think the multiple windows version I have works well enough for now though. Thanks Colin!
comment Posted December 19, 2007 Posted December 19, 2007 When the user dupes the record, the duplicate does not automatically end up as the last record in the set This will happen when records are sorted. Since any find will cause records to become unsorted anyway, you could achieve the same result by: Unsort Records Duplicate Record/Request
Recommended Posts
This topic is 6183 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 accountSign in
Already have an account? Sign in here.
Sign In Now