Variable not displaying in HR Case view - Additional Details (Service Portal)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2025 06:11 AM
Hi everyone,
We’re facing a strange issue with one of the variables from a Record Producer not displaying in the HR Case view on the Service Portal, and we’re hoping someone might have come across something similar.
Here’s the setup:
The variable is of type Reference (pointing to the sys_user table).
It is placed inside a container along with another variable of the same type — the other one displays correctly.
The "Variable Availability" tab for the Record Producer is correctly set (see attached screenshot).
A Catalog UI Policy is applied to this variable. It uses a condition and “Reverse if false” to dynamically show/hide the variable. On the Record Producer form, the UI Policy works perfectly — the field becomes visible when it should, and we’re able to populate it without issues.
However, once the HR Case is created and viewed on the portal (via Additional Details tab), this specific variable is not shown — even though the other one is.
So we dug deeper:
We inspected the DOM and confirmed the variable is rendered in the widget, along with its value.
There are no customization's to the widget that we can find.
The element is present but hidden — we can't see any obvious reason why it would be.
From what we understand, the “Additional Details” section displays stored values and not a live interactive form, meaning client-side logic (like Catalog UI Policies) won’t run at that stage — but we’d still expect the variable to be shown by default if it has a value.
Has anyone experienced a similar behavior or have any ideas on what might be hiding the field at runtime?
Any suggestions would be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-17-2025 08:40 PM
Hello @TiagoTSilva.,
-
Clear Variable Value:Ensure that the "clear variable value" field in the Record Producer UI Policy actions is not set to "true" for the variable in question. If this is set to true, the UI policy may be clearing the variable value when the case is created, preventing it from being displayed in the "Additional Details" section.
-
Hide/Show Logic:If the variable is being hidden by a Catalog UI Policy, make sure the condition is not preventing it from being shown in the "Additional Details" section of the HR Case. Remember that the "Additional Details" displays stored values, not a live interactive form, so client-side UI policies might not be running.
- Missing Variable Editor: Verify that the "Variable Editor" is added to the HR Case form. If it's not, the variables won't be visible in the native view or the portal.
- Steps to Add Variable Editor:
- Go to Form Layout for the
sn_hr_core_case
table. - Locate the "Variable Editor" in the right-side slush bucket.
- Drag it from the left-side slush bucket to the right-side slush bucket.
- Save and exit.
- Go to Form Layout for the
- Steps to Add Variable Editor:
-
Customizations:Check for any customizations to the "Additional Details" widget in the Service Portal that might be preventing the variable from being rendered.
-
DOM Inspection:Use browser developer tools to inspect the DOM and confirm that the variable's HTML element is being rendered, even if it's hidden. This can help determine if the rendering is happening but is being hidden by CSS or other logic.
-
Before Insert BR:Check for any business rules that might be manipulating the variable value before it's saved on the HR Case.
-
After Insert BR:Also, check if there are any business rules that might be clearing the variable value after the case is created.
-
Read Permissions:Ensure that the user (or the role they belong to) has "Read" permissions for the variable on the
sn_hr_core_case
table. -
Impersonation Check:If impersonation is enabled, check if the user is being impersonated, as this can sometimes affect data access.
- Check UI Policies: Examine the Record Producer and Catalog UI Policies related to the variable to ensure they are not causing it to be hidden or cleared.
- Verify Variable Editor: Confirm that the "Variable Editor" is correctly added to the HR Case form.
- Inspect DOM: Use browser developer tools to inspect the "Additional Details" section and see if the variable's HTML element is rendered.
- Check Business Rules: Examine any business rules that might be manipulating the variable value.
- Review Permissions: Verify that the user has the necessary "Read" permissions for the variable.
- Contact Support: If the issue persists, it's recommended to contact ServiceNow support for further assistance.
If it is helpful, please hit the thumbs button and accept the correct solution by referring to this solution; it will be helpful to them.
Thanks & Regards,
Abbas Shaik