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 / Make button visible on...
Power Apps
Answered

Make button visible only if memeber found in M365 group - Issue

(0) ShareShare
ReportReport
Posted on by 24

Hello,

I am seriously struggling to get a button visible only if a user if found in a specific M365 Group.

 

I have created variables and a collection and associated these to the button visible property "Only one member will ever exist per group"

App  >> OnStart>>

Set(VarAdmin, false) ; Collect(ReviewerGroups, {AMMembers: Office365Groups.ListGroupMembers("MYGROUPID").value.mail}

 

Button1 >> Visible >>

VarAdmin

 

My Issue is in the below formula for:

Screen1 >> OnVisible >>

If(
IsEmpty(
Filter(
ReviewerGroups,
Lower(User().Email) in Lower(AMMembers.mail)
)
),
Set( VarAdmin, true ),
Set( VarAdmin, false )
)

 

I can confirm that the values appear in the collection on load as below:

darren28gould_1-1659015606914.png

darren28gould_2-1659015665965.png

 

 

I am not getting errors, The Screen>>Onvisible always sets the VarAdmin variable to true ignored the If statement

 

Any help or advise would be hugely appreciated.

Categories:
I have the same question (0)
  • Verified answer
    PriyankaGeethik Profile Picture
    3,320 Super User 2024 Season 1 on at

    Hi @darren28gould ,

     

    Would you try with switching the true and false ? like below if it helps. 

     

    If(
    IsEmpty(
    Filter(
    ReviewerGroups,
    Lower(User().Email) in Lower(AMMembers.mail)
    )
    ),
    Set( VarAdmin, false),
    Set( VarAdmin, true)
    )

     

     

  • darren28gould Profile Picture
    24 on at

    Success, haha feel a lil dumb right now. Thank you soo soo much

  • PriyankaGeethik Profile Picture
    3,320 Super User 2024 Season 1 on at

    Happens to everybody 😊

    Happy to help!

     

     

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

#2
11manish Profile Picture

11manish 181 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 112 Super User 2026 Season 2

Last 30 days Overall leaderboard