I am trying to build a process that bypasses the decision task when certain conditions are met. The form I built has 4 custom fields that contain yes or no single select options for PII information.
The process will need approval if there are any forms of PII but if all of the options for PII are no then it should bypass and no approval decision should be sent out.
This is what i have tried but it doesn't work and keeps generating and assigning the decision to me when i test it.
if(
$new.parentEvent.W("CONFIDENTIAL PII").name = "No" and
$new.parentEvent.W("RESTRICTED CONFIDENTIAL PII").name = "No" and
$new.parentEvent.W("PCI - CREDIT CARD DATA").name = "No" and
$new.parentEvent.W("PROTECTED HEALTH INFORMATION").name = "No",
true,
false
)
I have also tried it with “.shortCode” instead of “.name” and it behaves the same.
I have even tried it with just $new.W(“custom field name”) dropping the parentEvent