Grid Validation using expression rule

Hello all, 

          I'm trying to validate a grid value which is of type CDT. So lets call this CDT.value, now i'm validating CDT.value by passing it to a Expression Rule in the validations part of the a!gridfield(), but I'm currently getting an error no matter what way I pass this CDT.Value to the Expression rule to evaluate, the error is: Cannot index property 'Value' of type Text into null value of type CDT?list. 

 

    I understand this error is telling me I can't compare a grid (Cdt.value) which is text to a subset of values. Has anyone tried this before? using an expression rule to validate grid data and displaying validation errors accordingly? 

 

 

Thanks, 

Nick

  Discussion posts and replies are publicly visible

Parents
  • Fixed this issue, my problem was there was a grid field I needed to validate, but the gridfield would be stored as CDT.Value and the above mentioned error would occur. So I declared the index() as said and put a tostring() around it and stored it in a local variable, also furthermore in the validation part I wrapped that local!var around a with() and now I can validate any user input for that value based on my expression rule validations.
Reply
  • Fixed this issue, my problem was there was a grid field I needed to validate, but the gridfield would be stored as CDT.Value and the above mentioned error would occur. So I declared the index() as said and put a tostring() around it and stored it in a local variable, also furthermore in the validation part I wrapped that local!var around a with() and now I can validate any user input for that value based on my expression rule validations.
Children
No Data