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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Nest Commands - Execut...
Power Apps
Answered

Nest Commands - Execute Multiple Commands w/n an If Statement

(0) ShareShare
ReportReport
Posted on by 35

Hi - I am attempting to execute multiple commands based on the condition of an if statement. 

For example:

If(A, EXECUTE1, EXECUTE2, false)

 

or 

 

If(IsBlank(A) or IsBlank(B),

 EXECUTE1,

 EXECUTE2,

false)

 

Any ideas?

Categories:
I have the same question (0)
  • PierreCA Profile Picture
    364 Moderator on at

    Hello @RichHarr , 

    Do something like that: 

     

    If( ConditionA = true or ConditionB= true, 

    // if answer is true
    ( Execute 1 and Excute 2, ....),

    // is answer is false

    (Do3 and Do 4,...))

     

    Parentheses are key

  • RH-25092337-0 Profile Picture
    35 on at

    Pierre, thanks for responding. Still having issues.

    Below is a snapshot of my snipet.

     

    If(
        !IsBlank(tmpVar1) ,
         (
            Set(tmpVar1,"")
           And
          Set(tmpVar2,"")
        ),
    false
    )
     
    Thoughts?
  • Verified answer
    Micky Profile Picture
    365 Moderator on at

    You can also use this :

    If(statement,
    Set(tmpVar1,"") ; Set(tmpVar2,""), // you can perform multiple actions by separating it with semicolon(;) 

    false

    )

  • PierreCA Profile Picture
    364 Moderator on at

    Hello @RichHarr 

    There's a link to an exemple at the end of the article. 

    PowerApps If Statement And Nested If With Example | Power Apps (devoworx.net)

     

    Maybe the property where you located your code expects a value. In that case, you maybe need to reconsider how to program your solution. The mechanisim is different to VBA or a similar language. 

    Microsoft Power Fx overview - Power Platform | Microsoft Learn

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 356 Most Valuable Professional

#2
11manish Profile Picture

11manish 225 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 211

Last 30 days Overall leaderboard