Adding additional rows to MRVS automatically in a Catalog item after user adds one row
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
We are looking to see if it is possible to add rows automatically into the MRVS. We have a requirement to add some dependent roles when you add a row into the MRVS while submitting the request. For example: If Role1 has two dependent roles (RoleA, RoleB), When you add Role1 in the MRVS, it should add 3 rows in total. (2 more for the dependent role)
- Labels:
-
Request Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi,
Yes this is possible by using an onSubmit catalog client script that triggers on the MRVS.
Using g_form.getValue('your_mrvs_name') will allow you to access the stringified JSON value. Parsing this will allow you to then manipulate the data, and add values. You can the set the value.
var obj = JSON.parse(g_form.getValue('your_mrvs_name'));
obj.push({
variable_name: 'variable_value',
});
g_form.setValue("your_mrvs_name", JSON.stringify(obj));
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
@Kieran Anson
We have the Roles coming from a custom table. When you are in the Catalog Item and adding the row, it needs to be able to fetch the child roles from the custom table and add rows in real-time.
