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

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

Recommended Posts

Posted

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

Posted

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.

Posted

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.

Posted

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

Posted

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

Posted

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.

Posted

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

Posted

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.

Posted

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

Posted

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.

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