A

3 Messages

 • 

355 Points

Tuesday, September 24th, 2024 6:54 PM

Validation Rule script using "isequal" seems to return true/valid regardless of values.

My use case: Validate that the Name and Full Name attributes have the same value.
The script
rule {

isEqual(attributes.'Full Name'.first(), attributes.'Name'.first(), message:"The Full Name and Name attributes must have the same value" ) 

}
The rule returns valid/true -- even when the values are different.
I've also tried this:
rule {

isEqual(attributes.'Full Name'?.first(), attributes.'Name'?.first(), message:"The Full Name and Name attributes must have the same value" ) 

}
and this:

rule {

isEqual(attributes.'Full Name', attributes.'Name', message:"The Full Name and Name attributes must have the same value" ) 

}

Any help is appreciated. Thank you.

117 Messages

 • 

8K Points

21 days ago

not sure if you already checked Validation script examples (collibra.com)

3 Messages

 • 

355 Points

@grantrollerson1​ Thank you for the link. I used that as a resource, and I was following the syntax in the examples. I ultimately got it to work with this:

rule {
 isEqual(name,displayName, message:"The Full Name and Name attributes must have the same value" )
}

117 Messages

 • 

8K Points

gotcha. yeap right for the attibute. wasn't needed. copy that 

3 Messages

 • 

355 Points

20 days ago

I ultimately got the script to work using just name and displayName.

rule {
 isEqual(name,displayName, message:"The Full Name and Name attributes must have the same value" )
}

Loading...