The CreatorCon Call for Content is officially open! Get started here.

How to export and import values/answers from a multi row variable set via XML?

Phong Lo
Tera Guru
I'm trying to move values/answers from a variable set in a record producer from instance A to instance B by exporting and importing the data via XML, using data from the "sc_multi_row_question_answer" table, but the data isn't being populated in instance B. I'm not sure if this is the correct table. Additionally, I was given info that the data is essentially stored in a format of a UI macro to display the data. I don't have much experience in this. Any guidance would be great! Thank you!
6 REPLIES 6

Omkar Kadoli
Tera Contributor

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

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.