/
Custom Error Messages

© 2025 IQVIA - All Rights Reserved

Custom Error Messages

Summary

Edit checks which return false result in an error message being displayed to the user. By default this is the error message configured in this field on the edit check:

Please note that Edit Check Error Messages are limited to 200 characters with spaces.

For more complex edit checks it may be useful to display a more specific error message. This is possible using the customErrorMessage function.

Additionally, the customErrorMessage function allows for an Error Message greater than 200 characters.

 

Using customErrorMessage from an Edit Check

This feature is available starting in ClinSpark 1.5.3. Customers can NOT use the customErrorMessage function in prior versions; the edit check will fail if attempted.

Please watch this walkthrough to see customErrorMessage in action:

https://vimeo.com/540883372/68580760fa

Here is the example shown in the walkthrough:

var value = itemJson.item.value; var ret = false; if (value == 0) { // just display the default error message. } else if (value == 1) { customErrorMessage("The value is 1, but needs to be at least 3!"); } else if (value == 2) { customErrorMessage("Still not quite large enough..."); } else if (value >= 3) { ret = true; } return ret;

Related content

Gender-specific Validation
Gender-specific Validation
Read with this
Creating Methods and Edit Checks
Creating Methods and Edit Checks
More like this
Date Comparison Method
Date Comparison Method
Read with this
Report and Dashboard Versioning in ClinSpark
Report and Dashboard Versioning in ClinSpark
More like this
Comparison of End of Study and AE Outcomes
Comparison of End of Study and AE Outcomes
Read with this
Ongoing Consistent with End Date
Ongoing Consistent with End Date
Read with this

Exported and Printed Copies Are Uncontrolled