Data Validations With SXP Extensibility


First published on: 03/20/2025/12:00 pm

 

  

Data validation allows the data store designed to set validations on values entered into a data store or record level as well as a specific record level. 

 

For example: 

  • Record level – Employee Hire Date cannot be AFTER Employee Termination Date.
  • Field level – DOB cannot be greater than today, quantity must be greater than 0. 

 

Record Level validations: 

  • To set a validation on a record level, navigate to your data store setup page and click on the 'Record Settings' tab. 

 

 

 

  • You can add a validation or edit/delete existing validations. 

 

  • To add a new validation, click the 'Add' button. 
    • A new validation will be added to the end, with a default level of 'Warning'. 

 

 

 

  • Click on the 'Script' link to edit the content. 
    • A placeholder script will be added to the script panel.
      • Follow the instructions on the right to create your own validation.
      • Script issues will be highlighted at the bottom. 

 

  • Save and close the dialog. 

 

A screenshot of a computer

AI-generated content may be incorrect. 

 

Below is an example of a script: “If the user marked that a warranty exists and a warranty expiration date was not provided, show validation error “Missing expiration date of warranty  (month/year)!” 

 

A computer code with black text

AI-generated content may be incorrect. 

 

On the main setup screen, double-click on the 'Level' column value to change the validation level. 

 

A screenshot of a computer

AI-generated content may be incorrect. 

 

TODO :  ask Liren to revisit this dialog. Its clear that its clickable.  

 

Field level validations: 

  • We will use field-level validations when the rule applies to only one field. 

 

  • To set a validation on one field, navigate back to the 'Fields' settings tab and select the field that needs validating.
    • Add a new script or use the Script link to edit an existing script. 

 

 

 

When all is set and saved, adding a new record on a grid or form using this data store will validate and show the user the issues.

 

When a failure is detected, the user cannot submit a record. 

 

A screenshot of a computer

AI-generated content may be incorrect. 

 

In case of a warning, the user will get the validation rule note and have the chance to submit it anyway. 

 

A screenshot of a computer

AI-generated content may be incorrect. 

A screenshot of a computer

AI-generated content may be incorrect. 

 

All validations also apply to records inserted via the workflow.

 

Workflow actions will fail and return the error when needed. 

 

Need to explore date functions.. for example how do I set a rule of expiration date > 6 months.  

-