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.

Returning to a specific record

Featured Replies

How do I return to a specific record in a script?

I've figured out how to specify a script parameter using Get (Record ID), but how do I use that later in the script to go back to that same record? I'm guessing that I'd specify "Go to record" and use a calculation? But what is the syntax to recall the Record ID that I specified at hte beginning?

Or am I going about this all wrong? confused.gif

Thanks,

RDecker

Create a self-relationship from a global to the record id field. Set the global with the script parameter. Then you can use the Go to related Record [self_global|||id] to take you to the record you were on previously.

I have an example of this here.

Oh, my example is more to return to a found set than to a single record. To return to a single record is more simple.

  • Author

Thanks. I think. But you're over my head. I think I follow you up to the Go to related record. I've no idea what "[self_global|||id] " means or how to specify it. I've created a global field and set it with the script paramater, and also created a self-relationship btwn the global and the rec serial nmbr. (But is the record serial number the same as the Record ID retrieved with the Get (recID)? I thought that was a FM-assigned ID number?

I'm prob. missing several things here... frown.gif

RDecker

  • Author

The example file, etc. isn't what I'm trying to do. I'm not working with a found set. I'm on a layout where I need to assign a specific number to a record. To do that the script goes several other places as it figures out what that number should be. I need to be able to come back to the record I started on once that's finished so that I can insert the correct number in the appropriate field on that original record.

RDecker

self_global|||id is merely the name of your global to id relationship.

If your serial field is defined as an auto-enter calculation of Get(RecordID), then yes, they are the same. If not, pass your id field to the script instead.

  • Author

To return to a single record is more simple.

I hope so! But my brain is fogged this late at night. Should have quit some time ago. I'll monitor the forum for a bit longer, and then will have to pick it up tomorrow.

Thanks for any help.

RDecker

By the way, if you only need to set a value and not visually return to the record, you can Set Field [therelationship::field, value] just as easily.

  • Author

if you only need to set a value and not visually return to the record, you can Set Field

I *do* need to return to the record.

I think I've finally got this one figured out. At least it's working with my sample data. I'll have to beat on it some more tomorrow to be sure it's right.

Then I'll inquire about a better way to do what I've prob. done the long, round-about way. My script seems too long and clunky and I suspect there's a much more elegant solution.

Thanks for your help tonight.

RDecker

I *do* need to return to the record.

Attached is an example of what I think you're trying to accomplish. It uses Queue's suggested method (above).

Check out the relationships and also the "go_back" script.

Good luck.

GoSpecifiedRecord.fp7.zip

I think in Jim's example that a GTRR is not necessary. Since you're simply going back to the starting layout and haven't changed records in it, a Go to Layout [Members] should return you to the same record. It would only be if you had navigated to a different member record that a GTRR to the original would be needed. In Decker's case, it sounds like he's performing a script that moves between records within the same layout, so a GTRR is necessary to return to the original record.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

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.