Jump to content

script to find records using minimum & maximum values


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

Recommended Posts

  • Newbies

sorry, I am a novice in scripting...

I have a button which has to invoke a procedure to fill in two fields with a minimum and maximum thickness value ;

this should return a list of all records matching the values between those two; just as you can easily do manually in the find menu bar inserting the proper operators

 

Attention: the minimum needs to calculate with ≥ , the maximum with <

 

example:

product 1 : min thickness 2 mm (≥), max thickness 4 mm (<)

product 2 : min thickness 3 mm, max thickness 6 mm

product 3 : min thickness 6 mm, max thickness 8 mm

 

search: client wants a product offer between 2 and 6 mm > should return product 1 & 2, not product 3

 

table is called "steels"; layout is called "search"; fields min values: "minTh"; field max values "maxTh"

 

thanks for giving me a clue to get this calculated in a script ?

somehow scripting does not allow to create numbers ?

 

Set Field[ (steels::minTh)  ????? ]

Set Field[ (steels::maxTh)  ????? ]

Link to comment
Share on other sites

Like this (attached example).  You could also use a Show Custom Dialog[] instead of presenting the global fields if you wished.


Oh!  And welcome to FMForums!  :-)

 

Added:  What I wanted to explain is that when wanting to find a range of values, use min...max.

Thickness.fmp12.zip

Link to comment
Share on other sites

This topic is 2898 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
 Share

×
×
  • Create New...

Important Information

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