FlowChart check duplicates
Collapse
X
-
In condition there should be only one expression. You could use the formula before the gateway in the script task, and then check only variable in the gateway (as variable is an expression too).
Or try this in gateway:
This is a single expression.Code:ifThenElse( entity\attribute('phoneNumber'), record\exists( 'Lead', 'phoneNumber=', entity\attribute('phoneNumber'), 'id!=', entity\attribute('id') ), false );Leave a comment:
-
I try this code on gateway element, it doesn't work, what am I doing wrong?
Code:$phoneNumber = entity\attribute('phoneNumber'); $hasDuplicate = ifThenElse( $phoneNumber, record\exists('Lead', 'phoneNumber=', $phoneNumber), false );Leave a comment:
-
You can utilize formula record\exists function. Assign the result of the function to a variable. Then check the variable value in a gateway element. If the variable is not empty, it means there's a duplicate.
In a Script Task:
Code:$phoneNumber = entity\attribute('phoneNumber'); $emailAddress = entity\attribute('emailAddress'); $hasDuplicate = ifThenElse( $phoneNumber, record\exists('Lead', 'phoneNumber=', $phoneNumber), false ) || ifThenElse( $emailAddress, record\exists('Lead', 'emailAddress=', $emailAddress), false );Last edited by yuri; 12-25-2021, 10:22 AM.Leave a comment:
-
FlowChart check duplicates
Hello,
I am trying to get update a specific lead, and check if there is already duplicate who has the same phone or email, I am still a little bit new to the flowchart formulas.
How can I check for duplicates by phone or number in the BPM flowchart?
Many Thanks!

Leave a comment: