- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-12-2021 04:33 AM
Hi All,
below is my requirement.
I have total 100 users list. i want to import those users list in sys_user table using importsets.
In those 100 records 30 records are active = false. i don't want to include those 30 records in user table. hoow can i restrict that?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-12-2021 04:51 AM
You can ignore the rows from the excel if the target field is inactive
Use Transform map onBefore script for this
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
// Add your code here
if(target.active == false){
ignore = true;
}
})(source, map, log, target);
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
ā02-12-2021 04:45 AM
Hey,
You could use OnBefore script
if(!target.active){
ignore = true;
}
If my reply has helped in any way, kindly mark it correct/helpful. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-12-2021 04:51 AM
You can ignore the rows from the excel if the target field is inactive
Use Transform map onBefore script for this
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
// Add your code here
if(target.active == false){
ignore = true;
}
})(source, map, log, target);
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
ā02-13-2021 10:14 PM
Hope you are doing good.
Did my reply answer your question?
If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.
Thanks!
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
ā02-13-2021 10:18 PM
Hope you are doing good.
Did my reply answer your question?
If so, please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.
Thanks!
Ankur
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader