AnsweredAssumed Answered

Use of GetField and GetFieldName

Question asked by George99 on Aug 3, 2011
Latest reply on Aug 3, 2011 by George99

Title

Use of GetField and GetFieldName

Post

Hello all,

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.

For example.

On entry to the field

SetVariable $$CurrentAnswer;Value"QuestionSheet::ScreenAnswer"

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.

Help please?.

George Humphries Novice Filemaker user

Using Filemaker pro 10 and windows XP.

Outcomes