Validation question
Is it possible to write a validation that checks "if field1 is =X, then field 2 must be equal to “Y”. Or maybe field2 must be blank
Thanks,
Scott
S Benson
Posted 5 years ago · Edited 1 year ago·Last reply 5 years ago
4 comments
Is it possible to write a validation that checks "if field1 is =X, then field 2 must be equal to “Y”. Or maybe field2 must be blank
Thanks,
Scott
arthurburkhardt
·5 years ago · EditedSure. Here’s an example with two variables, in a data privacy context.
Variable 1 confirms whether there is a processor or there is not.
Variable 2 says which processor.
The script checks that the only valid situations are:
All other cases will evaluate as invalid.
noor
·5 years ago · Edited@arthur.burkhardt
Do you ensure that the IDs hard-coded do not change between environments?
For me, as I posted few weeks ago, I was tasked to write a rule on a custom attribute. When I was reading the attribute by name, the rule never worked but when I read it by ID, it did. I was not so comfortable with reading attributes with IDs as they change across environments(?). Else, I need to ensure they are same through some means.
arthurburkhardt
·5 years ago · EditedYes. All my IDs are the same throughout all environments.
The only exceptions are resources that can’t have the same ID, such as workflow definitions.
S Benson
OP5 years ago · Edited@arthur.burkhardt, as usual, an elegant answer - thanks!
Scott