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 / PowerApp Gallery filte...
Power Apps
Answered

PowerApp Gallery filtering based on Azure Group

(0) ShareShare
ReportReport
Posted on by 35

I have the following formula and I'm getting a warning that it can't evaluate the formula becuase the values being compared in the formula aren't the same type. It shows I'm comparing Text with Boolean, but I don't know how to do it any other way. It seems to work fine for now, but am worried it will break as I'm not using it correctly it seems. My goal is to be able to add users to an Azure AD group and then the gallary will only return items if they are within the group. Thanks!!

 

This is my Gallary formula for "Items"

 

If(varUser2 = isUserMemberAccountingGroup Or isUserMemberHRGroup, Sort('Open Position',Created,Descending), Sort(Filter('Open Position', 'Created By'.Email = Office365Users.MyProfile().Mail),Created,Ascending))

 

VarUser2 is 

Set(varUser2, User().Email);

 

And the Groups formula is

Set(isUserMemberAccountingGroup, varUser.Email in Office365Groups.ListGroupMembers("18334207-f414-b70c-d611de1614f2").value.mail);

Categories:
I have the same question (0)
  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    Microsoft Employee on at

    Hi @PowerEmployee7

    Yes, the error report is correct.

    The variable isUserMemberAccountingGroup is defined as a boolean because you compare varUser with Office365Groups.ListGroupMembers() using in operator.

     

    I will show why the isUserMemberAccountingGroup is a boolean value, here is a simple demo:

    User().Email in Office365Groups.ListGroupMembers(MyGroupId).value.mail

    vqiaqimsft_2-1666246369549.png

     

     

     

     

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

#2
11manish Profile Picture

11manish 153 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 116 Super User 2026 Season 2

Last 30 days Overall leaderboard