Home > Forum > Actions > Validation on Entered rows in item list

Validation on Entered rows in item list
0

Hello all,

Does anyone configured a validation rule and/or control field where you need to check if the lines added in a item list were already added in another instance?

I have a process for overtime registration and I want to block the user to add a new instance with dates that were already added for the same person in webcon.
I've created a control field but now all the processes are moved to cancel even if the values are different.

Can you help?
Thank you

MVP

Hi Andreia,

I haven't tested it nor have I verified the syntax of the statement but it should be something like:

select currentElementRows.DET_ID, otherElementRows.DET_ID
from WFElementDetails currentElementRows join WFElementDetails otherElementRows
on
-- setup the conditions for the same rows
currentElementRows.DET_WFCONID = otherElementRows.DET_WFCONID
and currentElementRows.DET_COMPAREFIELD = otherElementRows.DET_COMPAREFIELD
-- but only for other instances
and currentElementRows.DET_WFDID <> otherElementRows.DET_WFDID
where
currentElementRows.DET_WFDID = INSTANCEID

This should return all those rows, which are already entered in another instance.

Best regards,
Daniel