When accessing a data field in text field validation the data field is returning 'undefined' .. If I try and access the data field from a button then the value is present.
Is this correct?
The example to problem described by Kevin is that we have 3 fields:
We have some complex validation on pairs of firstName and lastName (every fields are stored in repeat)
Validation is triggered in lastName text field and it is using itemIndex and firstName values.
When we tried to access these values as data.itemIndex or data.firstName we were getting undefined all the time.
Then we created a button under those fields with Click event and it that event we did console.log(data.itemIndex) - in this case it was working fine.
At the end when inside validation event instead of data.itemIndex we used Form.data.itemIndex then we got expected value.
There should be no difference. Can you provide an example of your validation rule where you use a data field that is coming through as undefined?