- 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 01:13 AM
Hello @Daniel R2
I have a question for you.
How are you planning to cut the Name of the group. Upto how many characters?
So if my understanding is correct.
- Let's say the a group's name is - ServiceNow_admingroup_batch1
- The other group's name is - snow_admin_grp_batch1
How are we planning to cut the names here?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 01:32 AM - edited 02-13-2023 01:35 AM
Hi @SatyakiBose - thank you for your response.
If the group name does not start with "ABC-Random_ABCD-ServiceNow_AB_", they will just be copied into the 'Display Name' field.
So if we go back to my example, there could be:
1. ABC-Random_ABCD-ServiceNow_AB_batch1
2. ABC-Random_ABCD-ServiceNow_AB_batch2
Then here as the name starts with "ABC-Random_ABCD-ServiceNow_AB_" - then only the 'batch1' and the 'batch2' should be populated into the 'Display Name' field
However, we do have some where the group name does NOT start with "ABC-Random_ABCD-ServiceNow_AB_"
then in this case the 'name' should not be cut and instead just be copied into the 'Display Name'
It would be cut up to this 30 characters, as this is the amount of characters in this text:
ABC-Random_ABCD-ServiceNow_AB_

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 02:05 AM
Hello @Daniel R2
If your instance follows a standard naming convention for the groups, then this should be comparatively easy.
All you have to do is write a business to split the string.
You can refer to some existing community posts here:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2023 07:06 AM
Hi @SatyakiBose - Is it ok if you could provide an example script?