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.

Making a Search Field+Button

Featured Replies

I am making a small program to write Car deals using Filemaker, I want to put a Field called "Search" where I can type in the stock number, then have a button to hit to search the records for the "Stock #" field and bring up the matching one, if there isnt one lets say stock number 2124 if it exists it would display it, if it dosent exist it would create a new one. My question is how would I accomplish this?? I went to:

Specify button>Perform Find> I click the Specify button, select the "Stock #" Field. now I need to put something in Cryteria, I was thinking something like:

if Stock # = Search, how would I word it so the program can understand it, or is this not the way to do this??

Make the stock number entry field a global. Instead of just a Perform Find, use

Go to Layout [searchlayout]

Pause/Resume Script [ ]

If [not IsEmpty(global)]

Enter Find Mode [ ]

Set Field [stock#, global]

Perform Find [ ]

End If

or use a relationship between the global and the stock number field and test If [not IsEmpty(relationship::serial)] before Go to Related Records [show, relationship].

  • Author

Im kinda a newbie with this program, Im trying to figure out what you mean but the global thing is confusing me, and where im suposed to do this?? do I make it in script editer? Let me just clarify what Im wanting

On the Header I want to put a place to put in 4 numbers and a little button to hit, and in each record there is a field named "Stock #" Now what I want to do is beable to punch in lets say 2135 in the search field and hit the button, and if the stock # 2135 exists I want it to automaticly pop up, if it dosent exist I want to make a new record with Stock# field being filled in with 2135.

Global fields have one value throughout a file, no matter which record you are in. Make your search field in the header a global text or number field (depending how Stock# is defined). Attach the script above to your button. Add one more step to the beginning of it, Set Error Capture [On]. If the button is clicked and there is nothing in the field, it will not continue. Otherwise it will perform a find based on the number entered.

You could also make a relationship between the global text and Stock# fields and Go to Related Record [show, relationship] instead of the Enter Find Mode to Perform Find steps, after testing If [not IsEmpty(relationship::serial)].

  • Author

Thank you I will try toying around and see if I can get it to work!

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.