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

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

Recommended Posts

  • Newbies
Posted

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

Posted

Your syntax is wrong for the Set Field command:

 

Set Field[steels::minTh;"≥ 2"]

Set Field[steels::maxTh; "≤6"]

  • Newbies
Posted

yes, I know, but how can I catch the variable number that the user has put in in place of "2" and "6" ?

Posted

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

  • Newbies
Posted

great, works with a bit of mending (max en min fields in different fields), now adding extra filters,

thx a lot ! greetings from Belgium !

This topic is 3622 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.