October 13, 200322 yr 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?
October 13, 200322 yr Author Newbies 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?
October 13, 200322 yr 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
October 13, 200322 yr Author Newbies Thanks very much for your help. Ignorance is a tremendous burden. :^)
October 14, 200322 yr Author Newbies 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"]
October 14, 200322 yr 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.
October 14, 200322 yr Author Newbies It WORKS!!! You, my dear Queue, are a GENIUS!!! THANK YOU! jmbennett
October 14, 200322 yr And -Queue- wasn't even thinking hard, 'cause he is in the same time rehearsing on his drum kit
October 14, 200322 yr Well, I do have practice tonight. Gotta loosen up those throat muscles for the shotgunnin' that is about to begin. <urp> I love music!
October 14, 200322 yr RE: I love music! That is why I've stop playing Although I know some people, which are playing despite the fact, that they do love music
Create an account or sign in to comment