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

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

Recommended Posts

Posted

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

Posted

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

Posted

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

Posted

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.

Posted

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

Posted

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

Posted

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 ?

Posted

You have to specify the field or it will set/insert into the currently selected one.

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