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.

Creating Pop-up Search Fields

Featured Replies

  • Newbies

Greetings FM Gurus...I bow to your magnificence!

Well as you can see I am a mere acolyte in the FileMaker universe, I come from an ancient race known as Clipper developers so I know about databases, but the paradigm of using Filemaker is kicking my priestly butt. So here is a question I pose to you.

Scenario: 2 tables, a main and a related

SYSTEM db --- related to ---> SECTOR db

I have successfully created a form with fields from the main db (SYSTEMS) and a portal to a single related table (SECTORS). This form is used to enter data for the Systems db and also the Sector db via the portal, simple enough. As the data grew I decided to create a field on the screen that uses a value list, extrapolated from the System db, that shows the names of each System. I did this using a global variable. What would be great is whenever I select a new value in that pop-up list, I want the record pointer to move to that record. This is where I am hung up, since my paltry skills in FM are sadly limited. Do I do this with a button and script or use a FIND somehow (something I have avoided thus far), or do I pray that FM Gnomes will code it for me whilst I snooze in the night? With your wise guidance I know I can truly become powerful in FM!

All respect,

Acolyte Richard

[email protected]

Hello Richard,

If I understand you correctly, what you want to do is certainly achievable. There is some scope for confusion, however, as terms such as 'global variable' and 'record pointer' are not part of the FileMaker vocabulary. I assume that you mean that you have defined a value list and applied it to a global field as a pop-up list or menu?

If that is the case, you now need a script which is coded as follows (NB: for the purposes of this example, I've assumed your global field is called 'gSystemList', and it is based on values in a field called 'SystemID'):

Allow User Abort [off]

Set Error Capture [On]

Go to Field [select/Perform, "gSystemList"]

Loop

Exit Loop If ["gSystemList > "a""]

Pause/Resume Script ["00:00:01"]

End Loop

Exit Record/Request

Show All Records

Go to Record/Request/Page [First]

Loop

Exit Loop If ["SystemID = gSystemList"]

Go to Record/Request/Page [Exit after last, Next]

End Loop


Now, to make the process active, go to layout mode, select the 'gSystemList' field, call up the "Field Format" dialog and disable the "Allow entry into field" option. Then (with 'gSystemList' still selected) go to 'Specify Button', choose 'Perform Script' and attach the script outlined above.

Now when you click on the 'gSystemList' field, the pop-up list should appear, and when you click on an item on the list, the database should rapidly take you to the first record which matches the value you clicked on.

Hope this is of some help?! smile.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.