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

Flow Designer - Submit Catalog Item Request - Unable to set list collector type

Mark C_
Tera Expert

Hi,

Pretty new to flow designer and have been looking for answers.

So basically I have a catalog variable that is of list collector type that is not letting me assign values (it is showing as read-only.

Do you have any example of how I can set the values in using an action?

 

Thanks

 

 

27-07-2023 1-23-58 PM.png

 

27-07-2023 1-26-11 PM.png

 

 

6 REPLIES 6

Ankur Bawiskar
Tera Patron
Tera Patron

@Mark C_ 

As per Utah docs it's not supported

Check this

AnkurBawiskar_0-1690430290500.png

 

If my response helped please mark it correct and close the thread so that it benefits future readers.

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

Thanks, Ankur! Do you happen to know any sample custom action script I can use?

@Mark C_ 

Not currently.

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

@Mark C_ 

you can use custom action with script and use Cart API

Something like this and you can enhance it

try{

	var cartId = GlideGuid.generate(null);
	var cart = new Cart(cartId);
	//add your requested item to the cart by sys_id of the catalog item
	var item = cart.addItem('0336c34407d0d010540bf2508c1ed096', 1);

	//fill in the variables on the request item form
	cart.setVariable(item, "asset", "00a96c0d3790200044e0bfc8bcbe5dc3");
	cart.setVariable(item, "multiple_choice", "Phoenix");
	var rc = cart.placeOrder();
	gs.info(rc.number);

}
catch(ex){
	gs.info(ex);
}

If my response helped please mark it correct and close the thread so that it benefits future readers.

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