- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2025 06:18 PM
Hello Community,
Wondering if anyone would be able to explain this situation if they have experienced anything similar.
I have a record producer, that has a default status being 00_draft status (in a choice variable). When a users submits the form, the status would change into a different state (lets just say 20_submit_review for example).
This is where the issue lies, I made a client script to return the value of this field. unsure if i needed a client script or a catalog client script. I made one for both. Which then discovered that on the service portal view, catalog client script returns 00_draft and client script returns 20_submit_review.
Which oddly, when I checked on the navigation view, both returned the value that the form request_status variable showed.
When I changed to 00_draft it reflected accordingly, when I changed to 20_submit_review it changed accordingly.
Wondering why this is not the case in the service portal view.
If anyone knows help would be appreciated
Thank you.
Regards
Le Tran
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2025 01:07 AM
it's a select box variable and choices are coming from the table's field as per your screenshot.
your understanding is correct the value should not change unless some script changes it
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
02-27-2025 07:18 PM
please share screenshots of your scripts and where are you testing it
Catalog client script runs on target record as well
your client script is returning some other value -> did you check if any script either record producer script or business rule on target table of record producer is updating the value
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
02-27-2025 09:26 PM
I have used studio to code search for referenced variable and confirmed it is not being changed anywhere by another script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2025 09:45 PM
if you are using client script to access the variable value then this is the syntax
g_form.getValue('variables.variableName');
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
02-27-2025 10:41 PM
Hi Ankur, I don't believe I have a problem referencing the field, the alert works fine as the image reference shows. Thank you for your input.
I believe my question was more about whether its an expected behavior that navigation view and service portal view is handling the data differently.
Since in service portal, there is a different result, and the navigation view is in sync, and changes when the request_status field changes.
If you have anymore questions let me know
Regards
Le