Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building 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:

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,645 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,997 Most Valuable Professional

Leaderboard