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

Community Alums
Not applicable

Hi Aayush,

 

i am facing some issues while implementing the above code. Can we please connect and get this sorted for me as well.

Sure

Community Alums
Not applicable

Hello @kchorny ! The same thing is happening to me in my instance, where the Variable editor disappeared. Any ideas? It happened to you because in the flow designer you used an OOB action? Thanks

Hey @Community Alums ! if you are creating RITIM or TASK from flow then this will happend as they OOB functionality only work for OOB RITM which is created when we submit request. To resolve this issue you need to insert new record of variable which you want to visible for each new RITM/TASK.

Community Alums
Not applicable

Hi @Aayush5 ! Thank you for your answer. This issue of the variable editor not appearing is occurring for all the Catalog Items of the instance. What I can't find an explanation for is why in one of the instances the variable editor is visible and in another instance (with the same development) the editor variable is not visible. Could you explain me more about the solution of how to insert a new record of the variable? I didn't quite understand what you mean. The Variable Editor is added in the form layout. RITMs are created through the service portal. Thank you so much.