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 / Or statement not working
Power Apps
Answered

Or statement not working

(0) ShareShare
ReportReport
Posted on by 1,512

I have a checkbox that when clicked opens a popup.  The issue is I need it to look at the current user signed in and compare that user to the Safety Group to ensure that only those people who are listed have the ability to check the box.

 

I have it working for just the Scribe to be able to check that box but I also need the ChairPerson to be able to check it as well.

 

I do not know how to modify the code below to be an OR  so either one can check the box

 

UpdateContext(
 {
 lclPopUp: If(
 Or(DataCardValue45_2.Selected.DisplayName = CurrentUser.FullName,Or(DataCardValue56_2.Selected.DisplayName = CurrentUser.FullName,LookUp(SafetyMeetingGroups_1,Lower(Scribe.Email)=Lower(CurrentUser.Email)).ID>0)),
 "Trainer"
 )
 }
);

 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    154,930 Most Valuable Professional on at

    HI @Dorinda ,

    There is nothing much wrong with your code - slightly modified below to allow for Delegation, and slightly different syntax, but this would produce a Text Variable "Trainer" if both statements were true.

    UpdateContext(
     {
     lclPopUp: 
     If(
     DataCardValue45_2.Selected.DisplayName = CurrentUser.FullName ||
     (
     DataCardValue56_2.Selected.DisplayName = CurrentUser.FullName &&
     LookUp(
     SafetyMeetingGroups_1,
     StartsWith(
     Scribe.Email,
     CurrentUser.Email
     )
     ).ID > 0
     ),
     "Trainer"
     )
     }
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Dorinda Profile Picture
    1,512 on at

    That is only covering if it is the Scribe how do i account for the ChairPerson?

  • Verified answer
    WarrenBelz Profile Picture
    154,930 Most Valuable Professional on at

    @Dorinda ,

    Assuming a field name here

    UpdateContext(
     {
     lclPopUp: 
     If(
     DataCardValue45_2.Selected.DisplayName = CurrentUser.FullName ||
     (
     DataCardValue56_2.Selected.DisplayName = CurrentUser.FullName &&
     LookUp(
     SafetyMeetingGroups_1,
     StartsWith(
     Scribe.Email,
     CurrentUser.Email
     ) 
     ||
     StartsWith(
     Chairperson.Email,
     CurrentUser.Email
     )
     ).ID > 0
     ),
     "Trainer"
     )
     }
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • Dorinda Profile Picture
    1,512 on at

    Thank you!! works perfect

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 541

#2
WarrenBelz Profile Picture

WarrenBelz 434 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 289

Last 30 days Overall leaderboard