How to access reference variable in Flow Designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-30-2022 12:58 PM
Hi All,
I built a flow designer on catalog item and it has got a reference variable "Action" and through the defined script include 3 actions are displayed like Add, Modify & Delete. I would like to check this variable "Action" value during the approval process and based on that will create catalog tasks. When I am using this variable through dot walk, it showing me as Translated text and validated as false. I tried with both these options:-
1) Get Catalog Variables --> Action --> Name (Type as Translated text) is Add
2) Get Catalog Variable --> Action is Add
But in both ways it is evaluated as False.
Can anyone help/guide me through this issue?
Quick reply will be much appreciated!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-01-2023 10:56 AM
When you use the Get Catalog Variables action in Flow Designer, it returns the entire GlideRecord object of the record being reference. That means, you have access to all fields of the referenced record in your flow.
So for your use case, you could work with any of those field, like Name or Sys_ID. You could also consider using a Decision Table instead of if/else condition in your flow, to make it more scalable.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2023 12:42 PM
Hello manish123,
Any luck figuring this out? I have a similar situation where the reference variable is not evaluating true and falls into else loop rather than the if loop.
Below are the screenshots from Flow designer and Execution details. I can't figure out why this condition is evaluated False.
flow designer If Condition:
variable name ->Team->Name
Runtime values:
Any help will be much appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2023 08:25 AM
Well Folks!
You can't believe it. The same condition worked this time.
variable name ->Team->Name
I do not know why it was acting like that. It could be that I was testing it from the flow designer. This time I activated the flow and tested it. It worked. Then I changed my workflow condition and it worked again. Something was causing that IF condition to be evaluated as false. I changed the flow, click Done, Save, and then activated it. See pic below.