IF matching field THEN add increment (A,B,C etc)
I've run into some problems with an auto-enter calculation field. The field, "AuditLotNum", acts as a unique identifier for each record. Don't worry it is not used as a primary key, it is strictly to help integrate the database into an existing indexing system.
Anyways, my problem is that i need a way to search through the existing "audit" records and if there is a duplicate "AuditLotNum" field i want it to apply this custom function http://www.briandunning.com/cf/718
This is what i've come up with so far:
Set Variable [ $AuditLot; Value:Audit Form::AuditLotNumber ]
Enter Find Mode [ ]
Set Field [ Audit Form::AuditLotNumber; $AuditLot ]
Set Error Capture [ On ]
Perform Find [ ]
Set Variable [ $Error; Value:Get ( LastError ) ]
If [ $Error = 401 ]
Exit Script [ ]
Else If [$Error = 0 ]........... <------ I think the CF needs to go here but i can't seem to get it to work
Any help is appreciated!
EDIT: I should mention i tried the "replace field contents" script step after the Else If [$Error = 0 ], but the option to replace with calculation result was greyed out (probably because the "AuditLotNum" is defined as an auto-enter calculation)