web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Loop through Choices t...
Power Apps
Unanswered

Loop through Choices to build a list for dropdown items

(0) ShareShare
ReportReport
Posted on by 90

Hi, 

This sounds simple, but i can't seems to figure out an efficient way to achieve this. 

The scenario is simple. I have a Department Choice. I want all the choices to be the items of a dropdown control so the page can filter data based on the department dropdown filter. This is easy. But what i want is an extra "Select All" option in this list of items so the page's default choice is "Select All" and no data gets filtered initially. 

chent7_0-1704449842317.png

Here is my attempt to achieve what i descriped above. This code is incorrect, but hope you get my idea. 

 Collect(colDepartmentOptions, { Name: "--All--", Value: 0 });
 ForAll(Filter(Choices(Department), Value >= 5 && Value <=11) As d, 
 Collect(colDepartmentOptions, { Name: d.Label, Value: d.Value })
 );

 

Thanks for your help! 

 

Categories:
I have the same question (0)

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard