- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 12:47 AM
Hi,
On the sys_user_group form we have added a custom field called 'Display Name'
This is due to the fact that the name is to complex and we would prefer a more understandable display name.
There is a requirement to populate the custom field 'Display Name' based on the 'Name' field on the sys_user_group form through a Business Rule.
(The reason for this configuration, is due to a previous integration which has imported the necessary groups. So if more groups get loaded in the future, this Business Rule should organise it. We would also like a better dislplay name, as already mentioned above)
For e.g.
- If the "Name" field starts with "ABC-Random_ABCD-ServiceNow_AB_" it should be cut and the remaining text should be the "Display name"
- Otherwise "Name" should be copied fully to "Display name".
Is it possible if someone can please provide their support here or provide a script that would allow this to work.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 08:04 AM
Hi @Daniel R2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 04:47 AM
Hello @Daniel R2
As in the user table, we have the first name and last name concatenated into the name field, are you asking the reverse in this question?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 04:56 AM
@prithatcs - thanks for your response, yes you could put it like that exactly.
So if sys_user_group 'name' is ABC-Random_ABCD-ServiceNow_AB_batch1
then the 'display name' should be populated with just 'batch1'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 06:06 AM
Hi Daniel,
You can writing below code in Before Business Rule
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2023 02:47 AM
@Lakshmi priya3 - This works perfectly thank you! Before I accept the solution, I have one other question.
We have around 130 groups that need updating, what background script can we run to update these all automatically, instead of going through each one updating them manually?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 06:15 AM
Hi @Daniel R2 ,