- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-08-2023 10:09 PM
How to configure actions in flow designer for user who wants to add in multiple AD security group
two groups inputs are from decision table separated by comma sec1,sec2
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 12:48 AM
Try below steps:
1. Open the Flow Designer in ServiceNow.
2. Click on 'New' to create a new flow.
3. Provide a name and description for the flow.
4. Click on 'Begin Flow' to start creating the flow.
5. Add a 'Lookup Record' action to fetch the user record who needs to be added to the AD groups.
6. Add a 'Script' action to split the input from the decision table into an array of security groups. You can use the JavaScript split() function for this.
Here is a sample code:
var groups = current.decision_table_field.split(',');
7. Add a 'For Each' action to iterate over the array of security groups.
8. Inside the 'For Each' loop, add a 'Lookup Record' action to fetch the AD group record.
9. Add an 'Update Record' action to add the user to the AD group.
10. Save and test the flow.
Hope this helps you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-09-2023 12:48 AM
Try below steps:
1. Open the Flow Designer in ServiceNow.
2. Click on 'New' to create a new flow.
3. Provide a name and description for the flow.
4. Click on 'Begin Flow' to start creating the flow.
5. Add a 'Lookup Record' action to fetch the user record who needs to be added to the AD groups.
6. Add a 'Script' action to split the input from the decision table into an array of security groups. You can use the JavaScript split() function for this.
Here is a sample code:
var groups = current.decision_table_field.split(',');
7. Add a 'For Each' action to iterate over the array of security groups.
8. Inside the 'For Each' loop, add a 'Lookup Record' action to fetch the AD group record.
9. Add an 'Update Record' action to add the user to the AD group.
10. Save and test the flow.
Hope this helps you.