Duplicate instance validation with repeating grid row editing
I am building a repeating grid row editing function on a section. UI is easy to build but also I want to build a validation to check whether duplicate row is added in the whole list. I found out-of-the-box component which does that in Work Group settings in Operator ID section as below. This is a perfect sample code and I am mimicking the code exactly but mine is not doing this validation. I am unable to find the exact code or activity in out-of-the-box section but is this hidden somewhere? Can anyone tell me where it is so I don't have to build my own custom programmatic code?
Thanks I was able to copy and reuse the Java code you mentioned. Now if I use this activity in Post flow action it is a bit procedural. Above out-of-the-box skill check code is fired when save operation occurs on Operator ID instance. If I want to make my custom validation more universal than procedural, for example anytime the work object is saved it should fire, then is there any good spot to place?
Hi, since it is programmatic to fire this validation activity by each post flow action, I tried to find a more universal way - and I found Work-.Validate which runs every time work object is saved. I think this is a good fit although it fires every time, still we can add any validation in here. I am overriding this to MyCo-MyApp-Work-PurchaseRequest class but is this a good approach?
With this approach, we don't need to fire validation for every flow action but implement once, and works every time work object gets saved. However, it gives validation error when user does local action without saving invalid row input and try to submit the local action. The message is irrelevant as it is an error that comes from previous screen..