- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 06-27-2022 04:33 AM
Requirement: Generate predefined values in MVRS when user opens the form.
Solution:
To achieve this, need to pass the data to the MRVS in JSON string.
Below is sample JSON payload
[{"oracle_number":"OR-569","description":"Test 11"},{"oracle_number":"OR-45","description":"Test 22"}]
Here oracle_number, description are the internal names of the variables inside multi row variable set. Below is sample code to generate values from code.
$scope.page.g_form.setValue('oracle_setup','[{"oracle_number":"OR-569","description":"Test 11"},{"oracle_number":"OR-45","description":"Test 22"}]');
After submitting catalog item, we can check that generated data as below:
- 2,806 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @Mihir YSSS
The article is really helpful but when I have tried the same I noticed that while submitting the catalog item it is showing the message as shown below:
I have written below shown code in my client script on widget.
var title = JSON.stringify(response); // I can see the required data properly here.
$scope.page.g_form.setValue("plan_options", title);
But once I get the leave page message, if I click on leave then it is not setting the value for that particular variable.
Did you also got this message?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Neeraj Modi1 I didn't see this behavior strangely.