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

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.

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]

  • Author

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!

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

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.