Flow - scripted Short Description to include variable text
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-04-2020 04:10 PM
Hello.
In Flow Designer, I am trying to populate the Short Description of a catalog task, with a variable.
My variable is a choice - Request Type, whose value is request_type
One of my questions (choice) is Site Access, value is site_access.
See screenshot.
I have tried the script as follows:
var shortDesc = "Some text - " + d_data.trigger.current.variables.request_type;
and also
var shortDesc = "Some text - " +fd_data.trigger.current.variables.request_type.getDisplayValue();
and also
var shortDesc = "Some text - " +fd_data._1__get_catalog_variables.request_type;
But the Short Description is always returning Some text - site_access.
Thanks for any help. It's driving me mad 🙂
- Labels:
-
Service Catalog

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-04-2020 04:28 PM
try
return "Some text - " + fd_data.trigger.request_item.variables.request_type.getDisplayValue()
or
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-06-2020 11:02 AM
Thanks for the replay Mike, I know you're a good contributor here.
This unfortunately did not work for me. I did figure out a script like the one below that worked, but I ma not happy having to script for such a simple thing...not convinced about Flow yet.
Cheers,
Mark S
var shortDesc = "";
if (fd_data._1__get_catalog_variables.request_type == "site_access"){
shortDesc = "Site Access";
} else{
shortDesc = shortDesc = "This is NOT Site Access Request";
}
//gs.info("shortDesc: " + shortDesc);
return shortDesc;
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2020 07:23 AM
Have you tried something like this - https://community.servicenow.com/community?id=community_question&sys_id=aca79d8c1b969850d2ccea89bd4bcbd4