record producer request status field on service portal and nav view are different.

LePhucTanT
Giga Expert

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

1 ACCEPTED SOLUTION

@LePhucTanT 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

9 REPLIES 9

Ankur Bawiskar
Tera Patron
Tera Patron

@LePhucTanT 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Screenshot 2025-02-28 141012.png

Screenshot 2025-02-28 140932.png

 I have used studio to code search for referenced variable and confirmed it is not being changed anywhere by another script. 

@LePhucTanT 

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.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Screenshot 2025-02-28 153657.png

 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