add validation when uploading excel file

Jieun Jeong
Giga Contributor

Hi, I'd like to add validation when uploading excel file.

Currently, Error message appears only when the reference value is not match.

I'd like to add validation in these case.

- When Mandatory field is not entered

- When the key value is duplicated

- The specific validation I created

Can I add validation check and Can I set the error message?

find_real_file.png

1 ACCEPTED SOLUTION

Tom Sienkiewicz
Mega Sage

If you're using Import Sets for this, you can enforce mandatory fields in your transform map settings.

Also what you can do, is create an onBefore transform script with your custom validations and if they are not passed, you can ignore the insert of that row by setting "ignore = true".

If you need to, you can throw an error by settign the log.error() or, to stop the import set "error = true".

View solution in original post

2 REPLIES 2

Omender Singh
Tera Guru

Hi Jieun ,

 

Yes, you can add a Data Policy on the target table and take care of any validation.

 

https://docs.servicenow.com/en-US/bundle/sandiego-platform-administration/page/administer/field-administration/concept/c_DataPolicy.html

 

Please mark correct if it helped.

Tom Sienkiewicz
Mega Sage

If you're using Import Sets for this, you can enforce mandatory fields in your transform map settings.

Also what you can do, is create an onBefore transform script with your custom validations and if they are not passed, you can ignore the insert of that row by setting "ignore = true".

If you need to, you can throw an error by settign the log.error() or, to stop the import set "error = true".