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

How can I get the content of a Variable Set Value (catalog table variables) from a Service Catalog Item inside a workflow?

guy
Kilo Contributor

hi,

There is a field in the service catalog named "requested for" which the initiator of the request enters the data to the field. I want, by pressing the button "Order now" - that the data will enter to the field "requested for" in the requested items table. The script was made in the workflow.

I don't know how to access to the data in the catalog when there is a variable of type of Variable Set Value (catalog table variables).

thanks.


12 REPLIES 12

Is this 'test_result' are reference field ? where have you written the script ????


I have a variable set name "test" (it is a catalog table variable)



"test" include 2 variables:


1. "test" - type macro (with reference field to sys_user).


2. "test_result" - type Multi Line Text.



the script is written inside the workflow (Service Catalog Request) after the begin.



the idea is to create items under one request and for each item get the user name.


you want to update the requested for of the request or the requested item ? and does test_result contains the sys id of the one user or multiple users?


Of the requested item.



the test result contains the sys id of all the users i selected.



for example-


[{"hdr":"","forElement":"","preFields":[],"rows":[[{"field":"users","label":"user","mandatory":"","type":"reference","giveFocus":"","reference":"sys_user","choiceOptions":null,"refQual":"","onChangeFunc":"","cellCSS":"","labelCSS":""


,"show":"always","value":"22826bf03710200044e0bfc8bcbe5dec","display":"Alejandra Prenatt","relatedTable":"","disabled":false}],[{"field":"users","label":"user","mandatory":"","type":"reference","giveFocus":"","reference":"sys_user","choiceOptions":null,"refQual":"","onChangeFunc":"","cellCSS":"","labelCSS":"",


"show":"always","value":"06826bf03710200044e0bfc8bcbe5d8a","display":"Allyson Gillispie","relatedTable":"","disabled":false}]]}]


requested for on RITM is a reference field of I am not wrong ... You have multiple user id's on the variable test_result .. How do you plan to update the multiple values to the RITM ? Reference field can contain only one value ..



Also move the code to either workflow of requested item or a business rule on requested item....