- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago - last edited 2 hours ago
Hi,
I have a requirement in my Record Producer where there is a variable named 'From Stockroom' and a Variable Set containing the following fields:
1. Model - Reference to Model table
2. Condition - Select box - (New/Used/Refurbished)
3. Available Quantity - Read only , single line text.
Requirement
I want to auto-populate the 'Available Quantity' (quantity field sum) from alm_asset table based on the selected from_stockroom, model and condition.
For this requirement I have created a Client Callable Script Include and Onchange Client Script on condition field.
Using this setup, I am able to retrieve the correct quantity (sum) based on model and condition. However when I add from_stockroom to the query, the value is coming as a null, even though the stockroom is selected on the Record producer.
Note - Condition field is available in alm_asset table. And Onchange Client Script is written on condition field in record producer variable set.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi @UKush ,
is the variable set you are referring to is a MVRS?
if yes
you have to use
g_service_catalog API
https://www.servicenow.com/docs/r/api-reference/g_service_catalogClientAPI.html
g_service_catalog.parent.getValue("add your from_stockroom variable name here")//is it from_stockroom?if you are still facing the issue please share the more details like scripts and the variable information with some screenshots
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi @UKush ,
is the variable set you are referring to is a MVRS?
if yes
you have to use
g_service_catalog API
https://www.servicenow.com/docs/r/api-reference/g_service_catalogClientAPI.html
g_service_catalog.parent.getValue("add your from_stockroom variable name here")//is it from_stockroom?if you are still facing the issue please share the more details like scripts and the variable information with some screenshots
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
