First, I edited your post so it would be easier to read.
In your "Set Field By Name" script steps, you only have one parameter. What is the calculated field name returned?
I know nothing happens when your run this script. Do you have an idea where it is failing? Can you let me know what you are trying to accomplish? This may give me a clue where to start looking.
I want to sequencially find and print records that are displayed in the table view from a range of firstprint to lastprint in the paddle number field. When I run it Iget message "norecords match your request.
Okay. Now you are getting a message. That's a step in the right direction.
Since no records match your request, the find is failing.
In your Set Records By Name calculation, I only see one parameter. Can you calculations/parameters?
What calculated field is being set up for the find request?
First I modified the script:
Open File [ "Auction" ]
Enter Browse Mode Show All Records
Go to Layout [ "Invoices" (Auction) ]
Show Custom Dialog [Title: "Field Range"; Buttons: "OK", "Cancel"; Input #1: Auction::firstprint, "From Paddle #"; Input #2: Auction:: lastprint, "To paddle #" ]
Set Field [ Auction: presentrecord; Auction: presentrecord=Auction::firstprint ]
Set Field By Name [ Auction: presentrecord; Auction: presentrecord = Auction::firstprint ]
Exit Loop If [ Auction: :Iastprint <Auction: presentrecord ]
Enter Find Mode [ ]
Set Field By Name [ Auction: pattle number; Auction: presentrecord ] Perform Find [ 1
Print [ ]
Set Field [Auction: pattle number; Auction: pattle number= Auction: pattle number + 1 ]
Enter Browse Mode
What seems to be the problem is getting Auction: present record into Find.
On my previous reply the smiley faces should be "p".
Thank you for the information.
Let me double-check everything.
You are opening the file "Auction", entering Browse mode showing all records, and going to the layout "Invoices".
You are entering information into the fields "firstprint" and "lastprint" of the first record. If these are global fields, then they will appear in every record.
You are then setting the value of "presentrecord" to either 1 or 0 (depending on the value of firstprint).
We then enter the loop...
The presentrecord field is being set to 1 or 0, depending on the value of firstprint.
The loop is exited if lastprint < presentrecord. If lastprint is negative, or if lastprint is 0 when presentrecord is 1, then the loop is exited.
We enter Find mode and set pattle number to either 0 or 1 and perform the Find. If no records are found, you will receive an error message. You may want to Set Error Capture [On] prior to the find so you can capture the error message and display your own message.
Next, you Print.
After printing, you set the pattle number to the expression pattle number= pattle number + 1, which will never be equal, so the value is zero.
The loop ends and we repeat until lastprint is less than presentrecord.
Is this what you are expecting to happen?