1
0
-1

Hi All 

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?

Kind Regards

Kev

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Hello Tim,

      The example to problem described by Kevin is that we have 3 fields:

      1. Data field called itemIndex
      2. Text field called firstName
      3. Text field called lastName

      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.

       

        CommentAdd your comment...
      1.  
        1
        0
        -1

        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?

          CommentAdd your comment...