Question
The following data validation function uses the "contains" operator. If I apply 'test' in the value of FirstName, it works as expected. If I apply a 'John test' in the value of FirstName, it does not work as expected.
The data validation function (contains(attributes.FirstName.value, 'test')) in the UI which contains the following payload
[{"type":"UPDATE_ATTRIBUTE","uri":"entities/1HM9suJS/attributes/FirstName/3UoUzRfTH","newValue":{"value":"John test"},"crosswalk":{"type":"configuration/sources/Reltio","value":"1HM9suJS"}}]
- Request Payload
[{"type":"UPDATE_ATTRIBUTE","uri":"entities/1HM9suJS/attributes/FirstName/3UoUzRfTH","newValue":{"value":"test"},"crosswalk":{"type":"configuration/sources/Reltio","value":"1HM9suJS"}}]
- Response Payload
[{"errorType":"INCORRECT","severity":"ERROR","objectUri":null,"objectTypeUri":"configuration/entityTypes/HCP/attributes/FirstName","objectParentUri":null,"message":"First name contains \"test\""}]
Answer
To take into account both "test" and "John test". You need to define the validation expression as
"expression": "contains(attributes.FirstName.value, '*test*')"
Comments
Please sign in to leave a comment.