Skip 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 - Parameters

Featured Replies

  • Newbies

As a relative newcomer to FileMaker, I'm having problems with the Perform Find command. Having read a number of posts on this topic, my understanding is that you effectively have to use the Set Field command to store the variable, because FM can’t deal with $vars in the Perform Find command. However, I’m obviously missing something very basic (or I'm merely being very stupid) as I don’t understand what, if any, parameters you should then use in the Perform Find command.

I’m trying to write a script that will create an attendance record from two other tables Courses and Course_Lessons. The new record would be stored in a table called Attendance. Courses has details of a course, Course_Lessons has lesson details and is a related table on field FKey Course and Attendance is related to Course_Lessons via field Fkey Lessons.

The script would ideally find every lesson in the Course_Lessons table relating to one particular course. Effectively, a Perform Find statement within some sort of loop structure. The course id is passed to the Perform Find command via a variable.

Any help just to sort out this problem would be greatly appreciated.

Jacqu

Yes, putting the parameters in a 1-step Perform Find (or Constrain Find) can sometimes be a PITA (in my opinion). I usually use the Set Field approach, even though it is more steps. In that case you just uncheck [ ] Specify find requests (in the Perform Find).

Another reason I like the Set Field approach is that it is self-documenting. Though I suppose there is also something to be said for brevity. That's why we have both methods.

For what you want to do however I think I would use a relationship and Go To Related Record, in Browse mode. If you have the relationship you might well use it. It is best practice to make sure the relationship has records first, using:

If [ not IsEmpty (relationship::id)

    Go To Related Record [ relationship; layout ]

End If

I don't really see what you're doing however. If you are creating a bunch of basically "blank" attendance records, to mark as "attended" later, then a good method is to gather all the related IDs into a $variable using:

List (relationship::id)

Then loop thru the multi-line variable with a counter, creating the attendance records for each.

Seems as if you're missing Students. Attendance is usually a join table btw Courses and Students.

The script would ideally find every lesson in the Course_Lessons table relating to one particular course.

This is best accomplished by calling the Go to Related Record[] script step, with the option 'Show only related records'.

  • Author
  • Newbies

Thanks, everybody. I used GTRR and it worked a treat. Problem solved.

Jacq

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.