- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2025 06:21 AM
We have a record producer with multiple variables. There are numerous criteria based on user location, where some variables are either visible or not. I want to update the description of the HR Case with only those variables that are visible to the end user on the portal. I know there is g_form.isVisible(), but we are facing some issues with this method. Can anyone suggest the best alternative way to achieve this?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-06-2025 12:11 AM
We used g_form.getEditableFields() for this.
📌 This method returns an array of field names (comma-separated) that are not read-only, i.e., all fields visible and editable to the end user.
👉 So, we created an additional variable to store all these visible fields, and in the record producer script, we used that to dynamically update the Description field of the HR case.
✅ Just marking this as correct so it can be helpful to others in the community as well!
Thanks,
Astik T 😊💬
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2025 06:43 AM
this is not possible as the visibility etc works on UI but in server side you won't know this.
So this requirement is not possible.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2025 06:48 AM
Hi @Ankur Bawiskar ,
Can't we retrieve variable values from the client side using an onSubmit client script, capture only those visible to the end user, and pass them to the server side via GlideAjax to update the HR Case description?
We have implemented this method successfully, but the issue we are facing is that it fails randomly for certain cases. Any insights or suggestions to make it more reliable would be greatly appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2025 06:50 AM
share the complete scripts
how are you determining if the variable is visible? are you storing that in some hidden variable and then using that in description field?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-04-2025 06:59 AM - edited ‎04-05-2025 02:50 AM
.