Drag and drop variables to script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2024 01:10 AM
Hello All,
I'm hoping someone out there can assist me with this task. The field in question is "Description" and what I currently have is in the image below.
What I'm looking to do is script this part within the Catalog Task itself because there may be occasions where a user may leave 'Server Name' or 'User Account' empty. Rather than those values just being blank, I'd like to add the phrase "User did not provide the information".
Is that possible?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2024 01:35 AM
Hi @Juanm0765961779 ,
In flow designer create task activity you select toggle script option for field where you want to set the text.
In script you can access variable values using syntax "fd_data.trigger.request_item.variables.variable_name;" and validate value, set the description as you which . Below is the sample code
if(fd_data.trigger.request_item.variables.server_name == "" || fd_data.trigger.request_item.variables.User_Account == ""){
var result = "User did not provide the information";
}
return result;
Please accept my solution or hit help button if answer address your query.
Thanks,
Swamy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2024 01:54 AM
Does it make a difference if I'm pulling from "1 - Get Catalog Variables" vs "Trigger" or "RITM"?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-17-2024 02:28 AM
Hi,
Yes it's possible.
I would recommend to store the values retrieved from the Catalog variables in a Flow variable.
Then you can evaluate in the Flow, if the Flow variable is empty, set the value to something as you wrote, and finally use the Flow variable data as input in the description instead of the Catalog variable.