tripdragon Posted April 22, 2004 Posted April 22, 2004 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
Damocles Posted April 22, 2004 Posted April 22, 2004 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
Damocles Posted April 22, 2004 Posted April 22, 2004 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
tripdragon Posted April 22, 2004 Author Posted April 22, 2004 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.
Doug Leib Posted April 23, 2004 Posted April 23, 2004 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
-Queue- Posted April 23, 2004 Posted April 23, 2004 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"].
tripdragon Posted April 23, 2004 Author Posted April 23, 2004 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 ?
-Queue- Posted April 23, 2004 Posted April 23, 2004 You have to specify the field or it will set/insert into the currently selected one.
Doug Leib Posted April 23, 2004 Posted April 23, 2004 I tried the script before I posted it. It works. Just specify the field as indicated above.
Damocles Posted April 23, 2004 Posted April 23, 2004 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
Recommended Posts
This topic is 7522 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 accountSign in
Already have an account? Sign in here.
Sign In Now