- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2020 10:00 AM
Hi All,
I need to get all groups from LDAP node, but I have to a group OU=ServiceNow
Filter: (&(objectclass=group)(!(OU=ServiceNow)))
But after importing the group still i can see the group with OU=ServiceNow.
Thanks
Solved! Go to Solution.
- Labels:
-
Integrations

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2020 11:58 AM
I had similar requirements so I added below script on Transform Map to ignore those groups from importing.
if(source.u_dn.indexOf("OU=ServiceNow") > -1){
ignore = true;
}
Once the group is created in SN you will have to delete it before running the job.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2020 11:14 PM
Hi,
in that case then handle this using onBefore transform script
Sample script below
var incomingGroupName = source.<importSetFieldName>;
if(incomingGroupName.indexOf("OU=ServiceNow") > -1){
ignore = true;
}
If my answer solved your issue, please mark my answer as ✅ Correct & 👍Helpful based on the Impact.
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
12-24-2020 02:30 AM
Hi Ankur,
I have similar requirement as I want to remove test 0U data but in production service now instance only, Is there any way to appear the data in dev and UAT environment only ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2020 06:06 AM
As I mentioned, importing it to staging table and using trasform map will work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2020 02:31 AM
Hi Mike,
I have similar requirement as I want to remove test 0U data but in production service now instance only, Is there any way to appear the data in dev and UAT environment only ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-24-2020 05:48 AM
You can add something like below in Transform Map script section
if (gs.getProperty('instance_name') === 'prod' && source.u_dn.indexOf("OU=test") > -1) {
ignore = true;
}