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 / Creating multiple if c...
Power Apps
Answered

Creating multiple if conditions to navigate

(0) ShareShare
ReportReport
Posted on by

I'm trying to write a correct 'If' statement for a number of questions/responses that, when a button is clicked, sends the user to a relevant Outcome screen (there are three). The first 2 are OK as based on responses, the user either goes to first outcome or second outcome. How do I structure the statement for this third condition? The first conditions are: If 'relevant' but not 'limited' or 'relevant and limited', go to Outcome 2; if 'limited' but not 'relevant, go to Outcome 3. The third is: If 'relevant' but not 'limited' and a question on another screen is 'no' go to Outcome 4.

Categories:
I have the same question (0)
  • CU05080617-0 Profile Picture
    136 on at

    Hello there.

    I am not sure how you do this utilizing a button. I did this with a list box with my screens inside.
    On select i had this:

    UpdateContext({varMenuScreen:ListBox1.Selected.Value});

    If(varMenuScreen = "first",
    Navigate(scrFirst,BorderStyle.None),
    If(varMenuScreen = "second",
    Navigate(scrSecond,BorderStyle.None),
    Navigate(scrThird,BorderStyle.None)
    )
    )
    And inside my list box i had the names to update the variable and then navigate to my screen.

    Hope this helps a bit.

    Best regards,
    Nick





    NickFot_0-1710834895759.png

     

  • Verified answer
    jonbu Profile Picture
    156 on at

    Maybe you could use a switch operation as an alternative, easier way:
    https://learn.microsoft.com/en-us/power-platform/power-fx/reference/function-if

  • Bonniedog2 Profile Picture
    on at

    Thanks for the reference - after getting the multiple conditions correct, I used the Switch perfectly (also a lot simpler than If. Thanks!!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 536

#2
WarrenBelz Profile Picture

WarrenBelz 426 Most Valuable Professional

#3
Haque Profile Picture

Haque 305

Last 30 days Overall leaderboard