make new fields only available for certain users on the incident form
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-15-2022 07:03 PM
Hello developers, I have a custom incident form that I have been asked to add certain fields and those fields should only appear for service users when the opens the incident form
Fields that I added are:
1. Service Leadership
2. Service Owner
3. Service Plan
4. Service Innovation
I have added the fields to the incident form, but I was wondering how I can make these fields only appear for the service users when they open the incident form.
Help, please

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-15-2022 07:13 PM
Hi,
If you don't want those fields to appear as well as the data associated, then you can create a "read" ACL for the incident table for those specific fields and associate a role to it that only those users would have.
Alternatively, if this is just for the form, then you can use an onLoad client script with an example script such as:
if (g_user.hasRole('role_name')) {
g_form.setDisplay('field_1', true);
g_form.setDisplay('field_2', true);
g_form.setDisplay('field_3', true);
g_form.setDisplay('field_4', true);
} else {
g_form.setDisplay('field_1', false);
g_form.setDisplay('field_2', false);
g_form.setDisplay('field_3', false);
g_form.setDisplay('field_4', false);
}
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-17-2022 10:29 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-17-2022 10:43 AM
Hi,
You "can" achieve with UI Policies, but it's still scripting in the advanced box and it'd still use what I mentioned above. Where the top half of the code goes in the "true" box and the bottom half goes in the "false" box of the UI Policy advanced script section.
Otherwise, there's no "no code/low-code" for this since you're needing to evaluate their permission and/or group membership. That has to be done via script, essentially.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!