Service Catalog Variables map to description field on Service Catalog Task

purdue
Kilo Sage

Hello,

I need to map variables to description on Catalog Task but I tried using scripted option but keeps erroring out.  What is the syntax for this.   Any assistance is appreciated.

Screenshot 2024-06-07 at 12.59.48 PM.png

Screenshot 2024-06-07 at 1.06.30 PM.png

1 ACCEPTED SOLUTION

Hi @purdue could you please also check the semicolon at the line 3. I missed it. it should be like below

var desc = [];

 

Let me know if it is working or will find another solution.

View solution in original post

22 REPLIES 22

Hi purdue,

If you flip thing around, you should get what you need.

var someValue = g_form.getDisplayValue("<field name">);

I set up a simple select box on a form and when I queried its value as shown above it worked fine.

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster

var someValue = g_form.getDisplayValue("update");
return "Requested for: " + fd_data._1__get_catalog_variables.requested_for.name + "\n" + "Manager: " + fd_data._1__get_catalog_variables.manager + "\n" + "Job Title: " + fd_data._1__get_catalog_variables.job_title + "\n" + "Email: " + fd_data._1__get_catalog_variables.email + "\n" + "What would you like to update " + someValue + "\n" + "Update to: " + fd_data._1__get_catalog_variables.update_to.getDisplayValue();
Screenshot 2024-06-10 at 4.02.55 PM.png

Can you share your complete catalog client script, including the header information?  Where are you running it (Service Portal, EsC, UI16)?

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster

It is the script portion of catalog task description field. 

In a subflow. Thanks