cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Algorithm Logic Help: IF statement

Greetings PowerAutomate Community, 

I have a SharePoint list with seven (7) columns, each with checkbox inputs that can be selected by users. If any two (2) or more of these seven (7) checkboxes are selected simultaneously and saved to the list, an email notification needs to be triggered. I am using PowerAutomate to build the email notification. 

For the life of me, I cannot quite figure out an elegant way to represent the trigger statement (any two or more items selected out of seven) using IF/ELSE/AND statements in PowerAutomate. I am adamantly sure that I'm missing something blindingly obvious, and it's driving me nuts!

My logic so far:

Mathematically, selecting 2 from 7 would amount to a combination, as the order in which the items are chosen does not matter. Using the combinatorics formula, we have 7C2 = 7! / 2! x (7 - 2)! = 21. Meaning there are a MINIMUM of 21 different ways that can lead to the email getting trigged. This doesn't account for all of the cases when MORE than two (2) items are selected. 

My question:

Is there a way to count selections on checkboxes on the fly, so that the trigger can easily coded in? A counter variable trigger on > 2 would be the most obvious way to get it done in a programming language, but I'm stuck in PowerAutomate. 

Grateful for any help that can be provided. 

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Solution Sage
Solution Sage

Hi @Leslie ,

 

If the aim is to check 2 out of 7 , create a variable to hold the count of checked questions and at the end check for this variable to trigger email 

 

Thanks

View solution in original post

2 REPLIES 2
Highlighted
Solution Sage
Solution Sage

Hi @Leslie ,

 

If the aim is to check 2 out of 7 , create a variable to hold the count of checked questions and at the end check for this variable to trigger email 

 

Thanks

View solution in original post

Highlighted

Hi @ManishJain , I wasn't even aware that variables could be used in PowerAutomate! Thank you for enlightening me! 😀

 

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (8,993)