copy mrvs fields to html field on change request form
This content was last updated in 2024. It may still be useful, but could contain outdated information. Please confirm its accuracy before relying on it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2024 07:16 AM
Hello
I have multi row on RP and i need copy mrvs details to html field . i try it but it's not working .
i create BR that run after the change request state is open .
this is the code:
After i enter value on mrvs and submit the change request the details messed up on html field and the value are not in their row/column . what am i do wrong ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2024 08:34 AM
Hi @Omer Revach .
Refer below code and replace with your variable names.
var arr = producer.mrvs_name;
var desc = '<table border="1px"><tbody><tr><th>Social Impact Assessment</th><th>Entrepreneur Thinking</th><th>Digital Inclusion</th></tr>';
for (var i = 0; i < arr.getRowCount(); i++) {
desc += '<tr><td>' + arr.getRow(i).social_impact_assessment + "</td><td>" + arr.getRow(i).entrepreneur_thinking + "</td><td>" + arr.getRow(i).digital_inclusion + "</td></tr>";
}
desc += '</table>';
var keywrd = new GlideRecord('table name');
keywrd.initialize();
keywrd.setValue('u_keywords', desc);
keywrd.insert();
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda