July 16, 200421 yr 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? Thanks, RDecker
July 16, 200421 yr 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.
July 16, 200421 yr 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.
July 16, 200421 yr 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... RDecker
July 16, 200421 yr 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
July 16, 200421 yr 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.
July 16, 200421 yr 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
July 16, 200421 yr 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.
July 16, 200421 yr 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
July 16, 200421 yr 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
July 16, 200421 yr 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