Flow designer

satya30
Tera Contributor

I created a flow and this is common for the 3 catalog items.

Now I wanted to trigger approval to the approval group only for the two catalog items using that flow.
Solution 1:
Now I had the option to use if condition to trigger request item and then write the functionality. But the functionality is same for all three items so I do not want to repeat 3 times the same logic by doing

if request item is A trigger approval "A" then functionality
else if request item B trigger approval "B" then functionality
else functionality (since no approval required for this item C)

Solution 2:

Here I can create a variable in catalog item where the approval group is stored
so in this case

we can have if and else where in

if part we can trigger approval(using variable) then functionality which works for 2 items
then else then functionality which will work for 3 rd item

Other than these two solutions do we have any other solution where we can only write the functionality once in flow designer commonly for all the three items and including the approvals for the two items?

Please let me know the solution what could be the best approach here.

Thank you

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@satya30 

better approach -> Use Decision table and store name of catalog item as input and output will be the approval user/group

How to use a Decision Table in a flow with catalog item variables? 

1st option is good -> Flow gives you capability to use IF else logic

I won't go with 3rd option -> reason why to just store the group in some variable, this is unwanted information. If somebody creates report on that catalog item then they will see the variable. Also you will have to hide that variable during form submission on RITM, on SC TASK

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Mark Manders
Mega Patron

So you have a different process on the items, but want all of them handled through the same flow? 

Next to that, you are already describing 2 solutions you have. What isn't working in these? Why do you need another solution? 

Even more: why not just copy the flow and make them Item specific, because you are already having differences at this moment, so who knows about what other differences you are going to have to deal with in the future?


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark