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.

Find Based on a Variable

Featured Replies

  • Newbies

Seems like this should be easy but I can't seem to get it to work.

What I want to do is set a UserID as $ID and go to a listview on different layout and perform find UserID==$ID

I'm not aware of a way to find using a variable. Can you accomplish the same result by using a go to related records script step?

  • Author
  • Newbies

Well my design might be a problem for related record search since the UserID is a repeating field. For example I have a training record with ten participants names/userIDs. I create three certificates for each UserID. I want to use a button next to each name to list the certificates for said UserID.

Maybe I'm not understanding the problem but can't you just do something like this:

Enter Find Mode []

Set Field ["TheField";"$variable"]

Perform Find []

  • Author
  • Newbies

Beautiful! Thank You. See I knew there would be an easy way to do it. I kept trying to:

Enter Find Mode[]

Perform Find[userID==$ID]

I'm changing my profile level to beginner now :)

Edited by Guest

I understand fully. I would be willing to bet that there are lots of Filemaker developers that don't realize that SET FIELD works in the FIND mode. It's pretty obvious that it works in the BROWSE mode but when I first realized that it also works in the FIND mode, the world got a lot brighter.

Yep, didn't realize that using set field was the way to go.

  • 5 weeks later...

I am new to FMP and I am hopeful that the script talked about in this thread might help my problem. I am trying to use a script to automatically reduce the found set to records that match the account name of the user. Basically I want them to be able to log-in and then click a button that takes them to a layout where the recordset has already been reduced to only their records. I have the security functioning to where they can only see their records, but I am trying to get rid of the records.

Any help would be greatly appreciated!

Thanks

Why don't you capture their staffID in an open script, store it in a global and then use a gttr script set from that global to the list view of records that you want them to see.

Thanks for the suggestions - can you please be a bit more specific? I have only been using FMP for a few weeks and unfortunately I am not entirely clear on how I implement your suggestion.

Thanks

You need to review the use of Open Scripts and global fields. Also check out how to use Go to Related Record (GTTR).

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.