Variable editor not showing on dynamic request items

kchorny
Tera Guru

I have a catalog item, let's call it 'Request a network', where the user fills out a multi-row variable set (MRVS). Then the flow designer flow creates a request item (Catalog item = New connection) for each row in the MRVS. All that is working fine, the RITMs get created, but the Variables section is not visible on them at all.

 

When I view the form layout, I see Variable editor listed. I have several variables in this catalog item, so I'm stumped. I have checked for UI policies and client scripts running on the sc_req_item table and found nothing that would cause this. Nor are there any catalog UI policies or catalog client scripts for this catalog item. And even if there were, they wouldn't hide the entire Variable editor.

1 ACCEPTED SOLUTION

kchorny
Tera Guru

I figured this out. In my flow designer flow, I was using the OOB 'Create record' action to create the RITM records. I had to change my strategy and use a custom action with a script step that creates the RITMs using the following lines:

var helper = new GlideappCalculationHelper();
helper.addItemToExistingRequest(parentRequest,catItem,1);
helper.rebalanceRequest(parentRequest);

 

Where parentRequest and catItem are values that are passed into the custom action. When passing in parentRequest, the action input is a string and should be the related Request's sys_id.

View solution in original post

17 REPLIES 17

Meloper
Kilo Sage

Hi, 

my recommendation is. 

Request a PDI an check the OOB formatter / macro.

I guess your formatter/var editor could be legacy. 

I had the same problem in a customer instance 2 years before. 

If the formatter shows normal vars but no mrvs, i guess that could be the solution for you. 

 

Not sure if it makes a difference, but this instance was spun up on Paris.

 

There are variable sets and normal variables in the catalog item, but no MRVS variable sets. And the entire section is missing, not just the variables. 😞 See screen shot.

 

kchorny_0-1676576445986.png

 

Hi, 

click on the Header and check the Form Layout?

Is there a Formatter selected?

Meloper_0-1676617680394.png

 

if not follow this link or check if you maybe can select

 

 

Determining whether the Variable Editor is added to a form - Support and Troubleshooting (servicenow...

priyasunku
Kilo Sage

Hi @kchorny 

 

please check variable editor is added on the form or not.

 

Also if you are creating catalog item through script set the "global" to true for the catalog item variables. If you set it to true it gets displayed.

 

Please mark this as helpful if issue gets resolved