Use of GetField and GetFieldName
Could anyone please tell me what I'm doing wrong?
I have a layout with 5 fields, I need to run some verification scripts on the data in any one of the five fields before moving onto the next step. Rather than write five separate verification scripts, I'm trying to write a generic script that can reference the fields by means of a variable.
I thought getfield was the solution but it dosen't appear to work.
What I'm doing is as I enter the field I set a variable to the text name of the field then when I leave the field, the data should be verified by a generic script.
On entry to the field
Do I need to enter the table name or is that over kill?
ScreenAnswer being the name of the field with data to be verified. On attempting to leave the field the verification script runs.
In the script I have the following line
TrimAll ( GetFieldName ( $$CurrentAnswer ) ; 2 ; 3 ).
(trimall is just part of a much bigger verification process).
But no surprises, it dosen't work.
George Humphries Novice Filemaker user
Using Filemaker pro 10 and windows XP.