Populate catalog task with Variables selected.

sigmachiuta
Kilo Guru

I have added a few check box variables to an Item in my service catalog that only had the short description field.   In the workflow this is how we are populating the description field.....

task.description = current.variables.Request.getDisplayValue();

How can I add the additional 4 check boxes to this catalog task so the ITIL can see the selections that were made.   I can see in other Catalog tasks 'Variable Editor' on the task form   holds these fields and displays the variables, but I am not sure how they are being populated.   Any help would be appreciated!

4 REPLIES 4

Inactive_Us1976
Giga Expert

You can show different variables on the catalog task "Variable Editor" in a couple of different ways, dependent on if the item is running via workflow or delivery plan.



For Delivery Plans, go to the delivery plan, click on the desired Execution Plan Task and at the bottom of the screen you can add and remove the visible variables.





For a workflow run Catalog Item, you will go into the workflow, into the Catalog Task that the workflow generates and move all of the variables you want to show at the bottom of the screen.   (Variables on Task form)



You can also recreate the fields directly on the form and populate them via a script (like what you have above) but that's a bit of a maintenance nightmare and a pain.


Ah, I was using a Generate Task in the workflow not generate catalog task!   thanks


No problem!


Doug Julian
Giga Expert

If i understood correctly you are trying to push multiple variable values into the description field. One way would be to add  + "\n" +  between each variable you want written to the field. 

i.e

task.description = current.variables.Request.getDisplayValue() + "\n" + Varaible2 + "\n" + Variable3;

 

the + adds the variable data together before passing it to the target field while the "\n" separates them with line breaks for formatting. You can use other options to separate the values depending on what the variables contain and how you want it formatted

Hope this helps

 

After posting i just realized how old this original post was....well leaving the response in case it helps someone =D