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.

Perform Find with script parameters

Featured Replies

I am using the example in the filemaker book about using XML script parameters with the custom function GetParamXML to retrieve them. I am currently trying to make a button that will add a record to a join table, and I want to check to see if the record already exists in the table before I add it.

The way I am currently trying to do it, I am doing a perform find where the id of the record matches the parameter passed to the script. The only problem is, I don't think that "Perform Find" allows calculations in the criteria field.

So I guess my question is, how the heck do I do a simple search with data passed from a script parameter?

Maybe you can set a temporary global field with the script parameter and Perform Find based off the global value.

I don't think that "Perform Find" allows calculations in the criteria field.

That is correct. However, Set Field does. So try:

Enter Find Mode [ ] // NOTHING IS CHECKED

Set Field [ yourtable::fieldtosearch ; Get ( ScriptParameter ) // OR WHATEVER CALCULATION YOU NEED

Perform Find [ ]

If you have a relationship from the parent table to the join table based on the parent ID, then you can see if there is a related record without performing a find:

<From the parent table>

If [ isempty(jointable::recordID) ]

#No join record exists

End If

If your criteria for a "record already exists in the table" is more complex than that, you could add a Table Occurence with a multi-criteria relationship, then use the same type of test.

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.