Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7450 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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??

Posted

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].

Posted

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.

Posted

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)].

This topic is 7450 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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