cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JamesSnaps
Advocate IV
Advocate IV

Variable or random responses / action

We have a setup where a status message is posted on Slack when a trigger is fired. Is there a way to have multiple possible responses that the Flow chooses at random? Just as a way of mixing it up a bit, so it's not just the same message posted every time?

 

I contemplated setting up a variable that generates a random number and then a switch depending on what number is generated, but not sure how to set up the variable.

 

Many thanks.

1 ACCEPTED SOLUTION

Accepted Solutions
ErichH
Kudo Kingpin
Kudo Kingpin

Use the expression rand, 2 variables (those you need to initialize before using them) and a switch case 

 
"rand(1,4)"
 
RandomResponse.PNG
 
 
 
 
 

View solution in original post

2 REPLIES 2
ErichH
Kudo Kingpin
Kudo Kingpin

Use the expression rand, 2 variables (those you need to initialize before using them) and a switch case 

 
"rand(1,4)"
 
RandomResponse.PNG
 
 
 
 
 

View solution in original post

Fantastic Eric, thanks for the help.

Helpful resources

Announcements
MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MSFTBizAppsLaunchEvent

Experience what’s next for Power Virtual Agents

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Users online (77,091)