- 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 09:17 AM
did you debug the client script and script include?
what does that script include function do in server side?
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 10:29 AM - edited ‎04-05-2025 02:50 AM
.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2025 04:45 AM
Did you get a chance to check on my above response?
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
if the variable has value in it, it means it was visible -> this much you can do and based on that you can determine and print that in description
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
‎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 😊💬