cancel
Showing results for 
Search instead for 
Did you mean: 

field format validation

msantaana
Explorer
0 Kudos

Hi - would like to ask if it is possible to add a validation in the SBO Transaction Notification to validate the format of the field? For example in the phone field, the system will check if the user has entered the phone number in a specific format like 702-991-1029 (xxx-xxx-xxxx)? Thanks

Accepted Solutions (1)

Accepted Solutions (1)

Johan_H
Active Contributor
0 Kudos

Hi Maria,

This is possible at least for the MS SQL Server version, using the LIKE operator. You would get something like this:

SELECT 'Invalid phone number'
FROM RelevantTable
WHERE NOT RelevantField LIKE '[0-9][0-9][0-9][-][0-9][0-9][0-9][-][0-9][0-9][0-9][0-9]'
  AND RelevantKeyField = RelevantVariable

Regards,

Johan

Answers (0)