
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-28-2022 06:58 AM
We have a form in our Service Portal which customers can use to order something.
We use a Script to populate different fields from the record producer.
For example:
current.u_external_reference = producer.external_reference;
current.company = producer.account;
current.requested_by = producer.contact;
current.type = 'normal';
current.assignment_group = '5683776bdbab0300bb3288805b961926';
current.contact_type = 'self-service';
var description =
"Box order for: "+ producer.contact + "\n" +
"Quantity: " + producer.box_specifications.getRowCount();
Now we want to use a Multi Row Variable set which contain 2 fields.
- Color
- Dimensions
I already managed to get the Quantity value in above example.
But how do I get the values for each field in the Multi Row Variable set?
I want to see the box specifications as part of the description field.
Like:
var description =
"Box order for: "+ producer.contact + "\n" +
"Quantity: " + producer.box_specifications.getRowCount()
"Color and Dimensions: " + ??? + "\n" +
"Color and Dimensions: " + ??? + "\n" +
"Color and Dimensions: " + ??? ;
Etc…
It would be nice if for every row the customer ordered something, the specifications will be shown on a new row.
I already did some testing but that did not give any result.
var description1 = '';
var mrvs = producer.variables.box_specifications;
var l = mrvs.getRowCount();
for(var i = 0; i < l; i++) {
var row = mrvs.getRow(i);
var cells = row.getCells();
var m = cells.length;
for(var j = 0; j < m; j++) {
description1+=cells[j].getLabel() + ': ' + cells[j].getCellDisplayValue() + "\n" ;
}
current.comments='test ' + mrvs;
var description =
"Box order for: "+ producer.contact + "\n" +
"Quantity: " + producer.box_specifications.getRowCount() + "\n" +
"Color and Dimensions: " + "\n" + description1;
Hope anyone can help.
Many Thanks
Solved! Go to Solution.
- Labels:
-
Service Catalog
-
Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-01-2022 12:42 AM
var mrvs = producer.variables.box_specifications;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-07-2024 03:09 PM
I would like some help, I have a Record Producer "Form" where inside it I have a multi-row variable, I created another Reord Producer "Form" and created another multi-row, I wanted to know if there is a way to automatically copy the information from the first multi-row to each other on forms that have the second multi-row