Jump to content

Select specific number of records?


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

Recommended Posts

  • Newbies

I'm an infrequent FileMaker who can't figure out how to do something I hope is easy - I want to select only a certain number of records (say 7) after completing a specific search, so I can export an XML file with just the data from those (7) records. I can't figure out how to do it.

I can do all of this, complete the find, compose the XML, etc - I just don't know how to sub-select down to (7) records. I hope this is another step in the script. A tip or the secret or help would be appreciated. - DPAM

Link to comment
Share on other sites

Give us a hint on how you will select these seven records. Do you pick them? Are there 7 different search criteria that need to be automatically used? Are they the first seven records?

If you select them by hand, the technique is to mark the records by and then find the marked records using one of several methods.

-bd

Link to comment
Share on other sites

  • Newbies

I'd like the first 7 by the current sort order. And I need this to run by script so it can be automated

I know how to manully omit some number of records (but I wouldn't know the total quantity in the set so I can't do that via script). Thanks< Craig

Link to comment
Share on other sites

hmm... if you know how to omit some number of records (I've never tried so I don't know)...

then you could use the Status(CurrentFoundCount) [i think that's what it is] to determine how many records were found. Then omit that number minus 7 from the end of the found set.

--

Jason Wood

HeyWoody.com

Link to comment
Share on other sites

Try a script as follows (do not mind the syntax, it's the idea).

Show all records

Sort (by your criteria)

go to record [first]

setfield(gTemp,1)

loop

omit record

setfield (gtemp, gtemp+1)

exit loop if gtemp>7 or status(currentfoundcount)<1 (the last for security)

end loop

show omitted

Harryk

By the way, the status functions are in a menu right above AFTER you specify a script step..

Link to comment
Share on other sites

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