- 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 11:09 PM
I still didn't get your exact question.
the variable is showing different value on catalog form and on the actual target record?
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 11:24 PM
@Ankur Bawiskar
These are screenshots of the same record, just opened in different view, and the stored value is different. It is like the stored value in service portal, (i believe this is the catalog form) is static from when the users submitted the form.
Which is not the case in Screenshot 2025-02-28 161351.png.
its the navigation view, and the ticket request_status = 45 value.
Added 2 images of the ticket, so you can see they are the same ticket, but the client script is returning a different value for request_status variable.
Hope that makes more sense.
Regards
Le Tran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2025 11:40 PM
in this image you are using normal client script but you are accessing the variable in wrong syntax
Did you use this syntax?
g_form.getValue('variables.variableName');
request_status - variable on your record producer form -> is it mapped to some field on target?
If you try to access value of this variable in target record then it should be the same default value unless some script is updating that variable value after record producer is submitted.
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 11:54 PM
on the record producer, it is referencing a field.
If I am understanding correctly, the expected behavior is, they should be the same as long as the value is not getting update by a script?
regards
Le
- 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