cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Filter gallery by member of a Office365 Group

Hi there,

 

in a gallery in PowerApps I would like to filter all items by user of a specific Office365 group. Does anyone know how to do that?

 

Thanks in advance

Dorothee

14 REPLIES 14

Hi @Anonymous ,

Do you mean that you set the screen's Onvisible to :

User().Email in 'Office365-Groups'.ListGroupMembers("id").value.mail

Actually, I so not think this will work.

Because the id parameter value comes from this function: Office365Groups.ListOwnedGroupsV3().value.

If you directly use "id", it does not represent one specific group's id.

 

Please set this to your gallery's Visible:

If(IsEmpty(
           ForAll(Office365Groups.ListOwnedGroupsV3().value,
                  Filter(Office365Groups.ListGroupMembers(id).value,
                         User().Email in mail
                         )
                   )
            ),
false,true)

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@Anonymous 

Yes, that should work if that is all you need.  Sounds like you're making progress!

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!
Anonymous
Not applicable

@v-yutliu-msft  Well, with "id" I mean the specific ID of my group.  You don't think this does work?

@RandyHayes reply rather suggested that this works fine.

Hi @Anonymous ,

If you already get the specific group id, you could use this formula:

User().Email in 'Office365-Groups'.ListGroupMembers("id").value.mail

The formula that I posted is to get dynamic group id:

If(IsEmpty(
           ForAll(Office365Groups.ListOwnedGroupsV3().value,
                  Filter(Office365Groups.ListGroupMembers(id).value,
                         User().Email in mail
                         )
                   )
            ),
false,true)

 Actually, I just use Office365Groups.ListOwnedGroupsV3 to get group id. There's no other differences between your formula and mine.

 

 

Do you have any other problems?

If not,  could you change your issue's status to "Answered"?

 

 

Thanks!

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Anonymous
Not applicable

@v-yutliu-msft Yes. Thanks for your help!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (11,961)