RPM765 Posted December 7, 2005 Posted December 7, 2005 I have a 50,000 name mailing list DBF. I want to be able to select a range of zip codes for mailing, AND the number of records to find (or export.) I have the zip code range selection figured out, and I have provided a numeric Global field to enter the total number of records to find or export. This is where I hit the wall. How do I set FMP to find (or export) only a certain number of records within a found set?
Breezer Posted December 7, 2005 Posted December 7, 2005 (edited) Lets say your table is called "Depts" and the global field with the number you'd like to export is "g_Field" you may set up your script as follows: Go to layout[my_export_layout] Perform Find [] If [get(foundcount)=0] Show custom dialog ["Error!!"; "No records match your criteria"] Show all records Go to layout[original] Exit script Else Go to record [(Depts::g_Field)+1] Omit multiple Records ["99999999999"] Go to record [first] Export records[] Go to layout [original] you can also replace line 5 with: Omit multiple Records [Get(Foundcount)- Depts::g_Field+1] Edited December 7, 2005 by Guest
RPM765 Posted December 10, 2005 Author Posted December 10, 2005 (edited) I got it working, thanks to you pointing me in the right direction. I ended up doing it a little differently than you suggested, but it now works exactly like I wanted it to. I was even able to get the program to automatically give me the number of records asked for by using Omit Multiple Records[Get ( FoundCount ) - NumberToBeMailed] as the calculated number for the Omit Multiple Records step. Thanks, Breezer! Edited December 10, 2005 by Guest
Recommended Posts
This topic is 6926 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