Catalog item reference field shows sysIDs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2024 12:05 AM
Hi All,
I would like to create a field that shows in the dropdown all the groups that the requester belongs to however
when I test this catalog item I see that the sysIDs of the groups are fetched instead of the names of the groups. How can I fix it?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2024 12:13 AM
Hello @dev_K
Could you please check the display value for the sys_user_grmember table? If the display value for the sys_id field is set to true in that table, the sys_id will be reflected on the portal for the reference variable. To display the group name instead, you’ll need to set the display value to true for the group field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2024 12:20 AM - edited 09-27-2024 12:21 AM
Hi @dev_K ,
Check the sys_user_grmemebr table once, Weather the display value is true for the field you want to display.
Suppose if you want to get names of the groups set the group name field display value as TRUE.
"If you found my answer helpful, please give it a like and mark it as the accepted solution. It helps others find the solution more easily and supports the community!"
Thank you,
Aditya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2024 12:46 AM - edited 09-27-2024 12:55 AM
The thing is that even if you change the Display Value for that table, you can adjust what is shown in the reference field after the selection, but the lookup list itself won't change. You can also change that:
BUT both actions may cause issues in other scenarios where you want to work from the opposite point of view.
I would rather recommend to do a lookup against the actual sys_user_group table, and to filter for all the groups of the current user there. You can do what ever you want to do in the logic later (like with a Flow that is taking the selected group, and looking into the group membership table again). The bare M2M tables are probably not the best elements to expose in a catalog item.
Proposed solution:
sys_idINjavascript:gs.getUser().getMyGroups()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-27-2024 02:25 AM
it seems this ref qualifier does not work... im seeing all the groups