Validation scripts
I know how to write a validation script that check for “and”, that is conditions 1 and 2 must be met in order to pass the validation, but is it possible to write a routine that checks for either condition 1 or condition 2, or both?
For example, in order to pass the validation, a system must have
- A relationship to a database
- A relationship to file
- A relationship to both
However, if it does have a least one of these. it fails the validation!
Thanks
S Benson
Posted 5 years ago · Edited 1 year ago·Last reply 5 years ago
4 comments
S Benson
OP5 years ago · EditedArthur,
As usual, thanks for the outstanding reply!
Scott
arthurburkhardt
·5 years ago · EditedHow do you check for
ANDat the moment?For
OR, there are at least two ways to do it:AnyOf(collibra syntax)||(groovy syntax)https://productresources.collibra.com/docs/cloud-admin/latest/#DGCSettings/OperatingModel/ValidationRules/ValidationLogic/ref_multi-line-boolean-expressions.htm
Method 1: AnyOf
Method 2:
||S Benson
OP5 years ago · EditedArthur,
Thanks - The underlying question is “how do I validate for OR”. I know how to do AND.
Scott
arthurburkhardt
·5 years ago · EditedYou might have an overly complex validation rule.
If you want to validate for
then just validate for
. It will match all your requirements.