How to export and import values/answers from a multi row variable set via XML?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2022 01:52 PM - edited ‎10-12-2022 01:53 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2022 08:51 AM - edited ‎10-13-2022 08:53 AM
Hi there,
Have a look at the Multi Row Question Answer table [sc_multi_row_question_answer]. The variables from the Multi Row Variable Set are stored within there.
This is for both Catalog Items and Record Producers. Where Catalog Items also use a mtom table, the multi row variables doesn't.
OR
You can try this code hope it works,
var gr = new GlideRecord('sc_req_item');
if (gr.get('<SYS_ID OF RITM>'))
{
// Syntax for this is gr.variables.table_var which returns JSON array value as String
gs.log( "1.variables "+ gr.variables.server_build_list);
}
// Syntax for this is gr.variables.table_var.getRow(<ROW NUMBER [i]>) which returns ith row from the multi row variable
// and we are trying to access a cell out of it as below
var row = gr.variables.server_build_list.getRow('1');
gs.log( "Fetching Row 1 "+ row.u_data_center);
// Syntax for this is gr.variables.table_var.getRowCount( ) which returns current row count
gs.log( "Row Count "+gr.variables.server_build_list.getRowCount());
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Omkar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2022 09:16 AM
Hi Omkar,
I will look into your solution. I also forgot to mention there are UI macros in the multi-row variable set that needs to be moved over as well. I believe that is what is causing the issue. No solution as of yet. Thank you.