How to get Multi-row variable set of variable values into JSON
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-21-2022 11:45 AM
Hi All,
Please help me on below issue .
How to get Multi-row variable set of All variable values details. Some variables details missing in JSON which were not filled by user (empty variables ) .
Issue : On Catalog-item i have added 3- row details like below
Using with below Client-script I m trying to get 3-rows of variables details in JSON format. 3-rows of JSON format.
MRVS has around 25-variables. if you see above screenshot Prod variable are checkboxe , i made Prod checkbox : true for one-row only , in rest of 2-rows of Prod variable value is false.
i can see Prod: true only one time in total 3-rows of JSON , but why not it showing Prod:false in remaining 2-times. At-least variable /variable value has to show as Prod:false in next 2-rows of JSON format right, but here complete variable not at all showing in next 2-JSON lines.
Client script : OnSubmit
var value = g_form.getValue("IO:a0c19722dbe45450c38babc5ca96191b");
alert(value);
[{"server_name":"","dev_server":"","name_1":"5ad4a5fb1bbb2410f2e7ecadee4bcbc4","test_server":"","operational_status":"7","app_ci_dev":"","app_ci_qa":"","itglt_owner":"287b5a271b573700d849ed776e4bcb0b","description":"Qt Creator provides a cross-platform, complete integrated development environment (IDE) for application developers to create applications","go_live_date":"","install_type":"","qa":"false","dev":"false","app_ci_prod":"c7e159aa1b85781cf2e7ecadee4bcb1b","app_ci_test":"","server_not_found":"false","save_business_chb":"true","prod":"true","IO:089f6a7edb9689d00289818a139619e7":"false","test":"false","IO:009f6a7edb9689d00289818a139619e8":"true","primary_bpo":"bc985e231bd33700d849ed776e4bcba0","qa_server":"","IO:889f6a7edb9689d00289818a139619e7":"false","IO:8c9f6a7edb9689d00289818a139619e7":"false","review_date":"03/21/2022","IO:849f6a7edb9689d00289818a139619e7":"false","IO:0c9f6a7edb9689d00289818a139619e7":"false","primary_system_owner":"3b59d62b1bd33700d849ed776e4bcbf0","prod_server":""},
{"actions":"","name_1":"5b5c30fa1b79e01036e80ed6624bcb66","operational_status":"7","go_live_date":"","description":"AWS CodeArtifact is a fully managed artifact repository service that makes it easy for organizations of any size to securely store, publish, and share software packages used in their software development process.","itglt_owner":"981dc2a71b933700d849ed776e4bcb4d","primary_system_owner":"3b59d62b1bd33700d849ed776e4bcbf0","primary_bpo":"677b16671b573700d849ed776e4bcb5c","primary_so":"3b59d62b1bd33700d849ed776e4bcbf0","install_type":""},
{"actions":"","name_1":"5b78a03ddb0f2450405c9f67f4961991","operational_status":"7","go_live_date":"","description":"Medical Products General Web Portal","itglt_owner":"981dc2a71b933700d849ed776e4bcb4d","primary_system_owner":"3b59d62b1bd33700d849ed776e4bcbf0","primary_bpo":"3b59d62b1bd33700d849ed776e4bcbf0","primary_so":"3b59d62b1bd33700d849ed776e4bcbf0","install_type":""}]
how to get all variables details ?
MVRS has 25 variables means , 3 rows i added , so JSON must have 25 variables details in 3-times.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā04-05-2022 02:04 AM
so what's the actual error?
did you check the browser console?
Ankur
⨠Certified Technical Architect || ⨠9x ServiceNow MVP || ⨠ServiceNow Community Leader