Easy Import Bulk Load Issues
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2017 10:43 AM
I m in Istanbul Release and we have bulk load requirement in PRD environmentwe
Using "Load Data" , "Transform Map" , we can do the bulk load in DEV environment but when it comes to PRD environment, whats the best way?
We would be getting multiple bulk load request and each time, we would like to test it in the DEV environment before doing it in PRD. We thought of doing it through Easy import process.
But the excel template which we download doesnt have the "List collector " fields even though the field has been selected in the list..
Whats the suggestion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2017 02:28 PM
Kailash, Which query are you referring to???? If you're referring to the filter that reduces 100 records to 10, you would have to work with a list filter. It's a very simple fundamental component of the platform.... http://wiki.servicenow.com/index.php?title=Using_Filters_and_Breadcrumbs#gsc.tab=0 I hope this helps. Mike Reaves / Acorio Please "Answered" or "Helpful"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2017 05:22 AM
Hi Kailash,
You may not need validation for a reference or choice fields. For these fields maps, just set the choice action field to ignore so the new records or choices wont be inserted. An oob log entry for the ignored records will be added in transform map logs.
For a List fields, the values should be comma separated and you can validate each of its values. Here is a sample validation
var valid = '';
var arr =[];
var value = source.u_list_field; //Replace with your list import set field
arr = value.split(',');
for(var i=0; i<arr.length; i++) {
if(validateEntry(arr[i])){
valid += ',' + arr[i]; //Add valid entries
} else {
log.error("Entry invalid: "+ arr[i]);
}
}
answer = valid.substring(1);
function validateEntry(){
//Add code to validate the entry in the table related to List field
return true;
}
Note: code not tested
Thanks
Please Hit like, Helpful or Correct depending on the impact of the response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2017 12:48 PM
Please help
Thanks for your inputs. It really helped.. now i got stuck up with the script
This is what i m using in my code
Sample value which i pass to "devTools" is ADOBE ACROBAT,Batch File,HTML,te
and the result i m seeing in my List Collector is, ADOBE ACROBAT,Batch File,HTML,te,ADOBE ACROBAT,Batch File,HTML,
Actually "te" is the test value and should not be coming in after i execute the below script but i m seeing two times the same value.. dont know where i m missing this here.
Even instead of returning devToolArr.join(); i assigned its value to answer variable and returned it but it doesnt work out.
var devToolArr=[];
var devTools=source.u_development_tool; /
devToolArr = devTools.split(',');
var devToolsRec=new GlideRecord('x_opt_macro_govern_development_tools');
devToolsRec.addQuery('value','IN',devToolArr);
devToolsRec.query();
while(devToolsRec.next()){
devToolArr.push(devToolsRec.getValue('value'));
}
answer='';
return devToolArr.join();