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

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

Recommended Posts

Posted

You need to store your ID field number in a global to return to it later.

Set Field ["gID", "ID"]

Enter Find Mode [ ]

Set Field ["Show", "Y"]

Perform Find [ ]

Perform Script [sub-scripts, "sort by id"]

Go to Record/Request/Page ["gID"]

Go to Layout ["listview"]

This will return you to the current record on the list layout, which might much more easily be accomplished by just using the Go to Layout ["listview"] step. As long as you haven't navigated to another record, you'll still be on the current one when you switch layouts. Or is there more method to the madness than is obvious?

  • Newbies
Posted

There's a little more madness I'm afraid. Here's the script that takes the user from the list view to the form view. It finds a specific set of form records which, when DO Name="**click here to select name**", are still available to be filled out. That's why it's necessary to "show all records" when they go back to the list view. And that's where I seem to be losing the connection to the current record.

Go to Field ["ID"]

Copy[select,"ID]

Show All Records

Go to Layout["formview"]

Enter Find Mode[]

Go to Field["ID"]

Paste[select,"ID"]

Go to Field["DO Name"]

Insert Text[select, "**click here to select name**"]

Perform Find[]

I tried building the script with the global field as you suggested but get the "No records match this request" message upon execution. Will it still work if Show All Records is added? And where in the script should it appear?

Posted

Show All Records is superfluous when you're going into Find Mode immediately afterward. Your error is coming from your Perform Find [ ], either from your Copy/Paste, which I would encourage you not to use, and use a global instead, or your Insert Text: all steps which require the fields to be on the layout and don't appear necessary in your script. I would guess that either a necessary field is not present on the layout or there is no valid result, as it said.

Set Error Capture [On]

Set Field ["gID", "ID"]

Enter Find Mode [ ]

Set Field ["ID", "gID"]

Set Field ["DO Name, ""**click here to select name**""]

Perform Find [ ]

If ["not Status(CurrentFoundCount)"]

Show Message ["No records were found"]

Show All Records

Else

Go to Layout ["formview"]

End If

  • Newbies
Posted

Dear Queue:

Regarding this script, everything works until the sort is performed. At that point, all the records in the found set share the same gID so FM goes to the first record in the found set rather than to the record where ID = gID. The sort is indispensable. How can I direct FM to go to the record where ID = gID?

Set Field ["gID", "ID"]

Enter Find Mode [ ]

Set Field ["Show", "Y"]

Perform Find [ ]

Perform Script [sub-scripts, "sort by id"]

Go to Record/Request/Page ["gID"]

Go to Layout ["listview"]

Posted

Create a relationship from gID to ID in the same file. Instead of the Go to Record/..., use Go to Related Record [gID_to_ID].

I should have paid more attention and not used the Go to Record/Request/Page ["gID"] as you did. This will only take you to the record number in the current found count that matches the global (i.e. if gID = 4, the 4th record found), which is not what you wanted. Sorry about that.

Posted

Well, I do have practice tonight. Gotta loosen up those throat muscles for the shotgunnin' that is about to begin. tongue.gif <urp>

I love music! grin.gif

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