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.

saving requests into a table for future use

Featured Replies

  • Newbies

Hello,

Problaby a newbie question, but I a would like to save requests for future use, so that the requests can be brought up and performed again.

I would like to be able to store the request in a table with other request, so the user can search through that table, chose for a request and do a perform/find.

How do I do that?

eke! This is harder than it should be, I'm sure some kind soul will come by with smething better!

(There is a copy record script step but not a paste as record script step so you can't just abuse the clipboard.)

You could iterate through the fields with a script like:

If [ not Get ( ScriptParameter ) ]

# 1. First set up the iteration through the tab order

  Go to Layout [ thisLayout ]

  Go to Next Field #...goes to first field in tab order

  Perform Script [ "thisScript" ; Parameter: Get ( ActiveFeidlName ) & " unique.sub.seperator " & Get ( ActiveFieldContents ) & " unique.parameter.seperator " ]

Else If [ Exact ( LeftWords ( Get ( ScriptParameter ) ; 1 ) ; "Save.this.Search" ]

# 3. Now take the gathered data and plop it into the search table

  Enter Browse Mode

  Go to Layout [ searchesLayout ]

  New Record/Request

  Perform Script [ "buildTheSearch.Record" ; Parameter: RightWords ( Get ( ScriptParameter ) ; WordCount ( Get ( ScriptParameter ) - 1 ) ) ]

Else

# 2. Iterate each field in the tab order and load the scriptparameter with the search data

  Go to Next Record

  If [ Exact ( Get ( ActiveFieldName ) ; "firstFieldInLayout" ) ]

    Perform Script [ "thisScript" ; Parameter: "Save.this.Search " & Get ( ScriptParameter ) ]

  Else

    Perform Script [ "thisScript" ; Parameter: Get ( ScriptParameter ) & Get ( ActiveFeidlName ) & " unique.sub.seperator " & Get ( ActiveFieldContents ) & " unique.parameter.seperator " ]

  End If

End If

And then build the search record, ... the search table has fields:

key

search.id

field.name

search.string

and then (*phew*, there's more??)...

return to the first layout, rebuild the search from the search record, and run the find. Provide a search button to do the starting script.

but this still is incomplete because:

this won't handle OR searches (mutli-record find requests) without making it even more complicated

it's reliant on "firstFieldInLayoutOrder" in the script, so you have to precalculate this name and add it to the script parameter bit unless you want to write a script like this for each searchable table in the relationships graph.

this doesn't provide a pretty means to casually select and rerun the search ... you'd have to write a script to iterate through the search records in find mode on the searchable layout (so each search table's field will need a value list)

...but it's what I've got just now frown.gif

Create an account or sign in to comment

Important Information

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

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.