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 / Navigate Screen If For...
Power Apps
Answered

Navigate Screen If Formula

(0) ShareShare
ReportReport
Posted on by

Hi Experts,

 

In my app, i've put my test email address in a text box called Commercial1 and the same email address in a text box called Stage1Approver1. DataCardValue50 currently contains the text "Submitted", my code below, should take my test account to a screen named Stage1Approval because DataCardValue50.Text is "Submitted" and the user.Email is in Stage1Approver1.Text but when I click the button, it's taking me to Screen1 instead, can you advise where my code is wrong please?  

 

With(
 {wEmail: User().Email},
If(
 DataCardValue50.Text = "1st Stage Approved" &&
 wEmail in TechSales1.Text || wEmail in TechSales2.Text ||
 wEmail in Commercial1.Text || wEmail in Commercial2.Text ||
 wEmail in Sales1.Text || wEmail in Sales2.Text ||
 wEmail in 'R&D1'.Text || wEmail in 'R&D2'.Text ||
 wEmail in QHSE1.Text || wEmail in QHSE2.Text ||
 wEmail in Production1.Text || wEmail in Production2.Text ||
 wEmail in Compliance1.Text || wEmail in Compliance2.Text ||
 wEmail in IT1.Text || wEmail in IT2.Text,
 Navigate(Screen1),
 
 DataCardValue50.Text = "Submitted" &&
 wEmail in Stage1Approver1.Text || wEmail in Stage1Approver2.Text ||
 wEmail in Stage1Approver3.Text || wEmail in Stage1Approver4.Text,
 Navigate(Stage1Approval)
 ))

 

Thanks in advance!

 

Dave

Categories:
I have the same question (0)
  • Verified answer
    LaurensM Profile Picture
    12,516 Moderator on at

    Hi @Dave-ITMan,

     

    When using an AND and OR operators together, you will have to use brackets around the OR statement:

    With(
     {wEmail: User().Email},
     If(
     DataCardValue50.Text = "1st Stage Approved" &&
     (wEmail in TechSales1.Text || wEmail in TechSales2.Text ||
     wEmail in Commercial1.Text || wEmail in Commercial2.Text ||
     wEmail in Sales1.Text || wEmail in Sales2.Text ||
     wEmail in 'R&D1'.Text || wEmail in 'R&D2'.Text ||
     wEmail in QHSE1.Text || wEmail in QHSE2.Text ||
     wEmail in Production1.Text || wEmail in Production2.Text ||
     wEmail in Compliance1.Text || wEmail in Compliance2.Text ||
     wEmail in IT1.Text || wEmail in IT2.Text),
     Navigate(Screen1),
     
     DataCardValue50.Text = "Submitted" &&
     (wEmail in Stage1Approver1.Text || wEmail in Stage1Approver2.Text ||
     wEmail in Stage1Approver3.Text || wEmail in Stage1Approver4.Text),
     Navigate(Stage1Approval) 
     )
    )

     

    If this solves your question, would you be so kind as to accept it as a solution & give it a thumbs up.

    Thanks!

  • Dave-ITMan Profile Picture
    on at

    Hi @LaurensM ,

     

    Ahhhh, that's been making me go crazy for 2 days haha, thank you so much - much appreciated! 

     

    Regards

    Dave

  • LaurensM Profile Picture
    12,516 Moderator on at

    Glad to help @Dave-ITMan😊

     

    To give a short explanation: the issue was that the condition did not behave as you would expect it to, due to the missing brackets. The original code led to Power Apps reading the condition as follows:

     

    • OR (DataCardValue50.Text = "1st ..." AND wEmail in TechSales1)
    • OR wEmail in TechSales2.Text
    • OR wEmail in Commercial1.Text (This returned true and caused your issue)
    • ...

     

    By using brackets Power Apps now reads the conditions as follows:

    • DataCardValue50.Text = "1st ..." AND (wEmail in ... OR wEmail in ... OR ...)

     

    I hope this helps!

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!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 525 Most Valuable Professional

#2
Haque Profile Picture

Haque 308

#3
Kalathiya Profile Picture

Kalathiya 234 Super User 2026 Season 1

Last 30 days Overall leaderboard