Jump to content
Server Maintenance This Week. ×

search with in range of numbers


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

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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"].

Link to comment
Share on other sites

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