December 7, 200520 yr 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?
December 7, 200520 yr 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, 200520 yr by Guest
December 10, 200520 yr Author 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, 200520 yr by Guest
Create an account or sign in to comment