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 Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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

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.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,753)