- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2024 09:36 PM
Hi All,
Can we Pre-populate 3/4 Rows in MRVS When catalog item is loaded on portal?
I received a requirement where i need to show 3/4 pre-populate rows with values in MRVS (Multi Row Variable set) and last two columns should be editable.
I'm not able to find the solution for this can you please suggest something to achieve this requirement.
Thank you!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2024 03:14 AM
then simply form the json and set
something like this
var arr = [];
// give the correct variable names within MRVS and the correct values
var obj = {"variable1":"hello","variable2":"bye"};
arr.push(obj);
var obj1 = {"variable1":"hello1","variable2":"bye1"};
arr.push(obj1);
var obj2 = {"variable1":"hello12","variable2":"bye12"};
arr.push(obj2);
g_form.setValue('mrvsVariableName', JSON.stringify(arr));
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
12-12-2024 11:35 PM
Hi @Ankur Bawiskar,
Thanks again for respond.
I wrote this below script and it's working as i see alert msg when form is loading but this script not setting the value in MVRS
This type of JSON is we are getting. on alert body.
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2024 12:22 AM
is the variable set name "thresholds" correct?
Also are you sure the variable name within that Json object are correct?
if yes then it should work fine
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-19-2024 03:48 AM
Did you accidentally marked your own response as correct?
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