Is there a GET function that will tell me the current record number I am in? I tried Get(RecordID) and Get(RecordNumber) but they did not work.
In what context are you using these?
Get ( RecordNumber ) returns the position of the current record in the current found set.
Get ( RecordID ) returns an internal serial number that uniquely identifies each record. Unlike a serial number field, it cannot be changed expect by importing the records in to a new table, the imported records automtically get new record ID's in the order in which they are imported.
Get ( RecordNumber ) probably reports the correct number in a calculation field only if the calculation field is unstored.
I created a field called RecordNumber. It is a calculation field with GET(RecordNumber)in it. For example if I am in record #2 out of 3 of an unsorted set, the RecordNumber field says 13.
In a script I have with "Go To Record". I am want to "Set Variable" to save the current record and later in the script I use "Go To Record" to go back to it.
But is the calculation field an Unstored calculation field?
In any case, you don't need the calculation field to save the current record number
Set variable [$RecNo ; value: get ( RecordNumber ) ]
Just keep in mind that the record number will change if you modify the found set in any way, by sorting in a different order or by performing a find to name just two examples.
The only way I will modify the set is by Duplicating one of records and that always goes to the end. Will this still change the numbering?
Not true. If this is your unstored calculation:
It will return the position of the record in your current found set. It will update each time you modify the found set in a way that changes it's position in that order.
If the field is stored, it will record the order at the time the record is created and will then not update.
Thanks, I will have to re-right the script.
Retrieving data ...