cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
LuisTorres
Helper II
Helper II

How to populate dropdown with users from a group?

I have a group of approvers, this group might change

 

I want the list of approvers from that group to be the choices of the dropdown.

 

This will make it so when the approver list is changed, the dropdown will change automatically.

 

is there any way to achieve this?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @LuisTorres ,

Do you want to list all available members of a group within the Dropdown box?

Do you want the available options to be refreshed/updated automatically when any change made to your group?

 

Based on the formula that you mentioned, I think there is something wrong with it. When you use Office365Groups.ListGroupMembers(...) formula within your Dropdown box, it would not be refreshed/updated automatically when any change made to your group.

 

As an fixed solution, I think a collection could achieve your needs. Please consider take a try with the following workaround:

Set the OnStart property of App to following:

ClearCollect(
              MemberCollection, 
              Office365Groups.ListGroupMembers("Specific Group ID").value
)

Add a Timer control in your app (in same screen as your Dropdown box), set the Duration property to following:

1000

set the AutoStart and Repeat property of the Timer control to following:

true

set the OnTimerEnd property of the Timer control to following:

ClearCollect(
              MemberCollection, 
              Office365Groups.ListGroupMembers("Specific Group ID").value
)

 

Then set the Items property of the Dropdown box to following:

MemberCollection

set the displayName as display column value within the Dropdown box.

 

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
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

2 REPLIES 2
LuisTorres
Helper II
Helper II

So far Im trying to do something like this in dropdown items:

Choices(Office365Groups.ListGroupMembers(GROUPID))

 

I think im getting close, a few pointers might help 🙂

Hi @LuisTorres ,

Do you want to list all available members of a group within the Dropdown box?

Do you want the available options to be refreshed/updated automatically when any change made to your group?

 

Based on the formula that you mentioned, I think there is something wrong with it. When you use Office365Groups.ListGroupMembers(...) formula within your Dropdown box, it would not be refreshed/updated automatically when any change made to your group.

 

As an fixed solution, I think a collection could achieve your needs. Please consider take a try with the following workaround:

Set the OnStart property of App to following:

ClearCollect(
              MemberCollection, 
              Office365Groups.ListGroupMembers("Specific Group ID").value
)

Add a Timer control in your app (in same screen as your Dropdown box), set the Duration property to following:

1000

set the AutoStart and Repeat property of the Timer control to following:

true

set the OnTimerEnd property of the Timer control to following:

ClearCollect(
              MemberCollection, 
              Office365Groups.ListGroupMembers("Specific Group ID").value
)

 

Then set the Items property of the Dropdown box to following:

MemberCollection

set the displayName as display column value within the Dropdown box.

 

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
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

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Carousel April Dunnam Updated 768x460.jpg

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors
Users online (2,012)