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 Apps
Unanswered

Help me!

(0) ShareShare
ReportReport
Posted on by 438

How I get two if value match? I do correctly?

 

If(LookUp('Maintenance Window', ID = 1).Status.Value = "Turn Off", 'DHS Homepage','DHS Maintenance Window')&If(LookUp('Maintenance Window', ID = 2).Status.Value = "Turn Off", 'DHS Homepage','DHS Maintenance Window (Summer Break)')

 

Categories:
I have the same question (0)
  • charlessexton Profile Picture
    21 Super User 2024 Season 1 on at
    If(LookUp('Maintenance Window', ID = 1).Status.Value = "Turn Off", 'DHS Homepage','DHS Maintenance Window')&If(LookUp('Maintenance Window', ID = 2).Status.Value = "Turn Off", 'DHS Homepage','DHS Maintenance Window (Summer Break)')

    What do you want the code to do? If the ID is either 1 or 2 then display "DHS Homepage"? Otherwise display "DHS Maintenance Window"?

    Also, where are you putting this code?

  • dylandavis09 Profile Picture
    438 on at

    Yes, I want to do that. I am using the 'App' in the 'startscreen' property.

     

    The screen always starts on the DHS Homepage. When I turn on a specific value, it transitions to the maintenance window or the maintenance window for summer break 'startscreen'.

     

    Screenshot 2023-11-14 at 2.17.56 PM.png

    Screenshot 2023-11-14 at 2.18.05 PM.pngScreenshot 2023-11-14 at 2.18.13 PM.png

  • charlessexton Profile Picture
    21 Super User 2024 Season 1 on at

    How about this?

    If(
    	LookUp('Maintenance Window', ID = 1).Status.Value = "Turn Off" Or LookUp('Maintenance Window', ID = 2).Status.Value = "Turn Off",
    	'DHS Homepage',
    	'DHS Maintenance Window'
    )

     

    The confusing bit for me is why you have a 'DHS Maintenance Window' and a 'DHS Maintenance Window (Summer Break)'. Are both needed?

  • dylandavis09 Profile Picture
    438 on at

    Well, we need two different types of maintenance windows for our screens.

     

    The first Maintenance Window is for updates and security, and it is blocked during school hours due to testing or other reasons.

     

    The second Maintenance Window, specifically for Summer Break, is intended for students who have gone home for the summer break. This means students can't access it until they return next fall.

  • charlessexton Profile Picture
    21 Super User 2024 Season 1 on at

    You'll want to have another bit of logic in there related to that then. Just another check in your If() function.

  • timl Profile Picture
    36,733 Super User 2026 Season 1 on at

    @dylandavis09 

    Nesting the If statements will take you closer to what you want to achieve.

    Note that with your current data structure, it's possible to "Turn On" both 'DHS Maintenance Window' and  'DHS Maintenance Window (Summer Break)'. In that case, which screen do you want to display?

    If(LookUp('Maintenance Window', ID = 1).Status.Value = "Turn Off"
     && LookUp('Maintenance Window', ID = 2).Status.Value = "Turn Off",
     'DHS Homepage', 
     If(LookUp('Maintenance Window', ID = 1).Status.Value = "Turn Off"
     && LookUp('Maintenance Window', ID = 2).Status.Value <> "Turn Off",
     'DHS Maintenance Window',
     'DHS Maintenance Window (Summer Break)'
     )
    ) 
    

     

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 529 Most Valuable Professional

#2
Haque Profile Picture

Haque 230

#3
Kalathiya Profile Picture

Kalathiya 217 Super User 2026 Season 1

Last 30 days Overall leaderboard