April 22, 200421 yr Simple question. I have a file of records that have groups by numbers range. Like 8400's I want a script button that will search for a range like I can search in find mode. Like so: 84 ... 85 will pull up all 8400's- 8499's Can anyone hep me with this ? I looked at the if and end if, but not sure quite how to prase it. FileMaker Version: 6 Platform: Mac OS X Panther
April 22, 200421 yr TripDragon, I'm not sure if this is the functionality you are looking for. Couldn't tell if you wanted a pre-defined button to look for "88...89", so here is the next best thing. This "solution" uses one extra field (CentNumber) = Round(Original_Number/100,0) The script then asks for what range you want, expecting you to type in the "88...89" yourself. Sorry if this was not what you were looking for. Let me know, and I will see if a more elegant solution might emerge. Paul FileMaker Version: 6 Platform: Windows XP Range Find.zip
April 22, 200421 yr Sorry, that should be CentNumber = Int(Original_Number/100) What is the ultimate goal once you find all the records that match your "find" rquest? Would a portal work? I'll attach another file later. Paul
April 22, 200421 yr Author aw,,, sorry about that. I wanted to make a button that just does the find and displays the records at once. I know that I can send it to a file, but the way the client wants it is all in one file. I know that filemaker 7 has multiple tables, and that seems like an option if push comes to shove. But this seems like a simple script. I have just never become adapt yet at scripting.
April 23, 200421 yr Based upon your original post I got the idea you'd like to actually mimic a manual find by range ie. 8400...8500. You can do this with the following script. Enter Find Mode [] Set Field ["8400 & "..." & 8500"] Perform Find [Replace Found Set] In my example I've hard coded the numbers for the range but these values could come from global fields populated by input from a Custom Dialog Box for example if preferable. Or maybe you'd use buttons to select the input range for the script. Doug
April 23, 200421 yr If it's a number field, I believe you'll want to use Insert Calculated Result, since Set Field will try to conform the result to a number and may give an unexpected result. Also, if you are indeed hard-coding the find, then you can omit the ampersands and just use Insert Calculated Result [field, "8400...8500"].
April 23, 200421 yr Author hmm,,, This one was close Enter Find Mode [] Set Field ["8400 & "..." & 8500"] Perform Find [Replace Found Set] but it drops it into the wrong field... any clue of control of this ?
April 23, 200421 yr You have to specify the field or it will set/insert into the currently selected one.
April 23, 200421 yr I tried the script before I posted it. It works. Just specify the field as indicated above.
April 23, 200421 yr TripD, This is not what you originally asked, but it will quickly show you the information you are currently using a script to find. Open "GroupNumber" first and it will open the other file. Have a good weekend! paul Relationship instead of Find.zip
Create an account or sign in to comment