Display the roles in a Multi line
Community Alums
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2023 09:03 PM
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2023 09:09 PM
Hi @Community Alums
please provide the script & configurations for the "Roles" field
Maik
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2023 11:36 PM
Hello @Maik Skoddow,
Currently I'm configuring the script.
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
var traineeSysID = g_form.getValue('requested_for');
if (!traineeSysID) {
return;
}
var traineeRoleCollection = getUserRoles(traineeSysID);
g_form.setValue('roles_user', traineeRoleCollection.join);
}
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-18-2023 11:58 PM
Hi @Community Alums
as you did not provide the code for the method getUserRoles() I only can guess what's built there.
However, the line
g_form.setValue('roles_user', traineeRoleCollection.join);
seems to be wrong.
Please try instead:
g_form.setValue('roles_user', traineeRoleCollection.join('\n');
Maik