How to add mrvs variable in catalog task

SHALIKAS
Tera Guru

I have a Multi Row variable set which has some variables in it. The mrvs has a variable instructions. I want to display this instructions variable in every catalog task created in the ritm. Also I am using workflow.

How to do this

Note - We cannot make mrvs variable as global

3 REPLIES 3

Ehab Pilloor
Mega Sage

Hi @SHALIKAS,

 

You need to make sure the variable in MRVS has Global checked inside it.

This will make it is available in catalog request, RITM and CTASK.

 

Also add variables in each task, it is present below script option in the Catalog task block.

 

Regards,

Ehab Pilloor

We cannot set mrvs variable as global

Hi @SHALIKAS,

 

You can add a variable to show only in ctask (Use UI Policy to be visible in CTASK only) and populate it with mrvs instructions variable using script in catalog task block.

You can try this logic and make changes to the names:

 var mrvs = current.variables.mrvs_variable_set; // Replace with MRVS name
 var firstInstruction = '';

  if (mrvs != null) {
    var rows = mrvs.getRows();
    if (rows.length > 0) {
      firstInstruction = rows[0].instructions_text; // Replace with your variable name
    }
  }

  task.variables.single_instruction = firstInstruction; // Populate the new task variable 

 

Regards,

Ehab Pilloor