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
  • Thanks for all the suggestion. Instead of eliminating the values from the suggestion, I want a validation error. I am using the below code to achieve that. The validation is working fine for the last row, however, it is validating against all the above rows as well. Please refer the attachment for the UI.
    validations:if(any(rule!CP_MatchAnyExistingDoc(_,ri!document[ri!index]),apply(index(ri!document,_),1+enumerate(count(ri!document)-1))),

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

    ---rule!CP_MatchAnyExistingDoc-----
    if(
    ri!existingDoc.Document.DocName=ri!newDoc.Document.DocName,true,false()
    )


Reply
  • Thanks for all the suggestion. Instead of eliminating the values from the suggestion, I want a validation error. I am using the below code to achieve that. The validation is working fine for the last row, however, it is validating against all the above rows as well. Please refer the attachment for the UI.
    validations:if(any(rule!CP_MatchAnyExistingDoc(_,ri!document[ri!index]),apply(index(ri!document,_),1+enumerate(count(ri!document)-1))),

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

    ---rule!CP_MatchAnyExistingDoc-----
    if(
    ri!existingDoc.Document.DocName=ri!newDoc.Document.DocName,true,false()
    )


Children
No Data