Validate data before inserting

Harish74
Tera Expert

Hi there, I have created a Data source of type excel. When I load data, data will get inserted into Resource plan table.

I found an observation on this.i.e,

For suppose I have filled some value under 'Requested for' column in excel who is not an user. The data is getting imported still and creating some bad data.

I need to validate the value for 'Requested for' column before the data gets imported. How is it possible? If it is possible using some script in Transform map script please provide the script as well.

Thanks in advance

 

1 ACCEPTED SOLUTION

Hi,

in the excel you are getting user's user_name or email?

if you are getting user_name then in Referenced value field name give user_name

if you are getting email then give email

find_real_file.png

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

8 REPLIES 8

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

If the Requested for column is getting mapped with target field of type reference then you can use choice action as Ignore so that it doesn't create bad data

Choice action is available on field map

like this

find_real_file.png

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi,

I have another field which is visible only when the Requested_for got filled up. Will that get a value if the Requested_for  ignored to take a value?

Hi,

if requested for field on target is filled as empty then the other field won't be shown

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi ANkur, 

I tried setting the choice action as ignore. The existing users also not getting filled up this time. Do we need to provide user sys_id as the value instead of giving name?