Multi row variable set variables are not mapping in the variable editor of Custom scoped table

Balaraju K B
Tera Expert

Hi Everyone,

 

I have a Multi row variable set that contains two Single line text variables.

The issue is when the Request is submitted via Record producer these two variables from the Multi Row set is not getting mapped in Variable editor.

 

@Ankur Bawiskar  Any idea on this?

 

Thanks in Advance,

Bala

3 REPLIES 3

Ankur Bawiskar
Tera Patron
Tera Patron

@Balaraju K B 

possibly some onload client script is running on target record and clearing those variables?

Did you check the table "sc_multi_row_question_answer" has data in it for those variables for that target record?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader


@Ankur Bawiskar wrote:

@Balaraju K B 

possibly some onload client script is running on target record and clearing those variables?

Did you check the table "sc_multi_row_question_answer" has data in it for those variables for that target record?


@Ankur Bawiskar Thank you for your response.

All the other variables(not multi row) are mapping/populating correctly, but issue is only with this Multi row variable set's variables.

 

Thank you,

Bala

Amit Gujarathi
Giga Sage
Giga Sage

HI @Balaraju K B ,
I trust you are doing great.

To ensure the proper mapping of these variables, you need to make sure you follow the correct steps. Here's what you can do:

  1. Access the ServiceNow instance as a user with the necessary administrative privileges.
  2. Navigate to the relevant Record Producer that is causing the issue.
  3. Open the Record Producer in the Service Portal Designer or the Service Catalog.
  4. Locate the Multi Row variable set that contains the two Single line text variables.
  5. Verify that the two Single line text variables are correctly defined within the Multi Row variable set.
  6. Confirm that the variables are properly mapped to the corresponding fields in the Variable Editor.
  7. If the mapping is incorrect or missing, update it accordingly by editing the Record Producer.
  8. Save your changes and test the Record Producer by submitting a request to verify if the variables are now properly mapped.
// Example code to define a Multi Row variable set with two Single line text variables
var multiRowVariableSet = new GlideRecord('item_option_new');
multiRowVariableSet.initialize();
multiRowVariableSet.name = 'My Multi Row Variable Set';

// Define the first Single line text variable
var variable1 = new GlideRecord('item_option_new');
variable1.initialize();
variable1.name = 'Variable 1';
variable1.type = 'string';
variable1.multi_row = true; // Set to 'true' for Multi Row variable sets
variable1.insert();

// Define the second Single line text variable
var variable2 = new GlideRecord('item_option_new');
variable2.initialize();
variable2.name = 'Variable 2';
variable2.type = 'string';
variable2.multi_row = true; // Set to 'true' for Multi Row variable sets
variable2.insert();

// Map the variables to the Multi Row variable set
multiRowVariableSet.variables = variable1.sys_id + ',' + variable2.sys_id;
multiRowVariableSet.insert();

Was this answer helpful?


Please consider marking it correct or helpful.


Your feedback helps us improve!


Thank you!


Regards,


Amit Gujrathi