December 23, 201411 yr 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) ?? ]
December 23, 201411 yr Your syntax is wrong for the Set Field command: Set Field[steels::minTh;"≥ 2"] Set Field[steels::maxTh; "≤6"]
December 23, 201411 yr Author Newbies yes, I know, but how can I catch the variable number that the user has put in in place of "2" and "6" ?
December 23, 201411 yr 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
December 23, 201411 yr Author Newbies great, works with a bit of mending (max en min fields in different fields), now adding extra filters, thx a lot ! greetings from Belgium !
Create an account or sign in to comment