- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2017 01:52 AM
Hi All, I have a transform Map in which I had made a field as Coalesce, so that only matching records gets updated when user export the excel file and updates it and then uses the transform map to update the records in the table using the exported file which he/she has updated.
My challenges are:
1)I want the transform map not to update new records that are not part of export file that he did before updating (any new additions that are not there in the table)
2)I want the transform map not to update or stop updating, when a specific field has 'no records' / blank, show the error message about it
3)I want the transform map to update the records into the table only when the record workflow status is either 'A' or 'B'. I am sure that this can be achieved by using transform script which has to run On before query, not sure, how to achieve this.
Any help and suggestion, highly appreciated.
Regards,
Surya
Solved! Go to Solution.
- Labels:
-
Enterprise Asset Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2017 02:50 AM
i checked the above code it is not throwing an error if i insert with empty field , it is not inserting but showing as updated 1 record successfully. How the user knows that it is not inserted if it does not throw a message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2017 04:36 AM
Hi Suryan,
Can you add log statement to check what value the 'u_supp_validation_result' is having?
gs.log('SY Supp Validation result is:'+source.u_supp_validation_result);
if(source.u_supp_validation_result == ''){
error= true;
error_message = 'The field is blank';
}
if(action == 'insert'){
ignore = true;
}
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-14-2017 03:28 AM
1. uncheck run business rules - it will reduce confusion on the values while validation
2. verify the data with coalesce that you have added
3. then verify/load data the script @ankur has requested.