web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Multiple Ifs for one B...
Power Apps
Answered

Multiple Ifs for one Button

(1) ShareShare
ReportReport
Posted on by 6
Hello, 
I'm currently taking my first steps in Powerapps, but I'm stuck on one point.
I have 6 checkboxes and 6 flows. Now I want to press a button which checks whether a checkbox is checked and if so, a flow should be executed.
Then the 2nd checkbox should be checked (regardless of whether the first checkbox is checked or not and whether the 1st flow was executed) and if the 2nd one is checked, the 2nd flow should be executed and so on for all 6 checkboxes.
I have done the following with the button on select, but unfortunately this does not work. 
 
If (Checkbox1.Value = true ; Nachricht1.Run()) ;
If (Checkbox2.Value = true ; Nachricht2.Run()) ;
If (Checkbox3.Value = true ; Nachricht3.Run()) ;
If (Checkbox4.Value = true ; Nachricht4.Run()) ;
If (Checkbox5.Value = true ; Nachricht5.Run()) ;
If (Checkbox6.Value = true ; Nachricht6.Run()) ;
 
Can anyone help here?
Many thanks in advance!
 
Categories:
I have the same question (0)
  • level36 Profile Picture
    77 on at
    Hi, 
     
    It looks like you are using a ";" to separate statements within your Ifs. In an if statement, you separate the condition from the true and false values using a ",".
     
    Try the below code to see if that works better for you. 
     
    If(Checkbox1.Value = true, Nachricht1.Run());
    If(Checkbox2.Value = true, Nachricht2.Run());
    If(Checkbox3.Value = true, Nachricht3.Run());
    If(Checkbox4.Value = true, Nachricht4.Run());
    If(Checkbox5.Value = true, Nachricht5.Run());
    If(Checkbox6.Value = true, Nachricht6.Run());
     
  • CU31071426-3 Profile Picture
    6 on at
    Unfortunately its not working, it looks like that (only did it for 2 as example and the first Flow Name is Nachricht.Run) :
    But looks like the "," has a problem
     
     
  • Suggested answer
    Daniel Bocklandt Profile Picture
    5,099 Super User 2025 Season 2 on at
    Hey, 
     
    since you are using the german version of Power apps this should help you: 
    If (Checkbox1.Value = true ; Nachricht1.Run());;
    If (Checkbox2.Value = true ; Nachricht2.Run());;
    If (Checkbox3.Value = true ; Nachricht3.Run());;
    If (Checkbox4.Value = true ; Nachricht4.Run());;
    If (Checkbox5.Value = true ; Nachricht5.Run());;
    If (Checkbox6.Value = true ; Nachricht6.Run());;
    The german version uses ";" instead of "," and ";;" instead of ";" at the end of every if statement.
     
    If my answer helped you please accept it as solution to help others find a solution to this problem as well. 
  • kevinjeronne Profile Picture
    on at
    the syntax for an if statement is 
    If (
       Condition , 
       // true statement - put what should happen if the condition is true
       Checkbox1.Value = true ; Nachricht1.Run() ,
       //false statement - put what should happen if the condition is false it could be blank if there are nothing needed to happen 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard