how to fetch selected dropdown value of the variable in catalog task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2023 12:09 PM - edited 03-15-2023 12:56 PM
Hi Team,
I have dropdown field called device which has 2 options mobile and laptop. User can select any one of these option while submitting the request.
I wish to fetch the value the user has selected in "reusable flow step" script. so i can include it in catalog task short description. i,e if user has selected mobile. the short description of task should be "user has selected mobile".
I wish to achieve this without using data pill and only through script.
Thanks in Advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2023 12:13 PM
I hope this helps.
Enable advance script and call the variable.
task.short_description = "User has selected " + current.variables.DEVICEVARIABLENAME.getDisplayValue();
Change DEVICEVARIABLENAME to the name of your form's variable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2023 12:45 PM - edited 03-15-2023 12:56 PM
this is not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-16-2023 05:12 AM
Are you using Workflow for this Requested Item?
I've created a quick Item that has a select box using Mobile and Laptop as the 2 options.
In the workflow I use a 'Catalog_Task' and checked advance applied the following code to set the Short Description.
task.short_description = "User has selected " + current.variables.device_cust.getDisplayValue();