Support Required: Record Producer Not Updating Description with MRVS Values
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi All,
I have created a Record Producer that includes a Multi-Row Variable Set (MRVS). My objective is to automatically append the values from the MRVS to the record's description field upon submission of a request.
I attempted to achieve this using an "After Insert" Business Rule; and also from Reocrd producer script section-however, the variables within the MRVS are not being appended as expected.
Could anyone please guide me on how to implement this functionality effectively?
Thank you in advance for your support.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday - last edited yesterday
This happens because MRVS data isn’t directly accessible through producer.variable_name in the Record Producer script, it’s stored as JSON.
You don't need a Business Rule for this, running your script in the Record Producer ensures the description is updated before the record is finalized.
For detailes, see : Scripting the Multi-row Variable Set from Brad Tilton
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Hi @kanvapuriga ,
Try with below script in record producer
// Get the MRVS data as a JSON string var mrvs_json = producer.mrvs_variable_set_name; // Parse the JSON string into a JavaScript array of objects var mrvs_array = JSON.parse(mrvs_json); // Initialize a string to hold the formatted MRVS data var mrvs_description = "\n\n--- Details from MRVS ---\n"; // Loop through each row of the MRVS for (var i = 0; i < mrvs_array.length; i++) { var row = mrvs_array[i]; // Add each variable's value to the description string // Access the variable by its internal name mrvs_description += "Variable Name: " + row.variable_name + "\n"; } // Append the formatted string to the current record's descriptioncurrent.description += mrvs_description;
- Navigate to your record producer.
- Go to the Variable Sets related list to find your MRVS.
- Right-click the variable set's header and select Configure > Form Layout. Add the Internal Name field to the form if it's not already there.
- Open the variable set record to view its internal name.
- In the variable set record, go to the Variables related list to find and copy the internal names for the individual variables you want to append.
If I could help you with your Query then, please hit the Thumb Icon and mark as Correct !!
Thanks, GP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
seems a duplicate question.
I already responded to your other thread below, please delete this one
Issue with Appending MRVS variables to Record Description
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader