CustomPickerField

I am using a custom picker field in an editable grid. This picker field is being called in a loop and only the last row when clicked on add item is editable, rest all the other rows are read only field. Now in the last row of the picker field suggestion, I want to eliminate all those values that are already entered in the above rows that are non editable. How do I achieve that?

OriginalPostID-245300

  Discussion posts and replies are publicly visible

Parents
  • I replaced the above code with the below one. Instead of ri!index, I used count(ri!document) as index to get the last row. It seems to do the trick. However, the validation message is showing on all rows.

    if(any(rule!CP_MatchAnyExistingDoc(_,ri!document[count(ri!document)]),apply(index(ri!document,_),1+enumerate(count(ri!document)-1))),

    "This document already exist for the claim. Duplicates not allowed","")
Reply
  • I replaced the above code with the below one. Instead of ri!index, I used count(ri!document) as index to get the last row. It seems to do the trick. However, the validation message is showing on all rows.

    if(any(rule!CP_MatchAnyExistingDoc(_,ri!document[count(ri!document)]),apply(index(ri!document,_),1+enumerate(count(ri!document)-1))),

    "This document already exist for the claim. Duplicates not allowed","")
Children
No Data