cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
TobiasSQA
Frequent Visitor

Filter that shows all items

Hello.

 

I have an app where I'm filtering items based on a sharepoint choice column, this filtering is happening based on the selection of a dropdown, the dropdown takes items from the sharepoint list.

 

Any ideas on how I would add a selection to that dropdown that would then disable the filtering and just show all items.

 

Items are being shown on a map (Geospatial Feature), but in theory it should be the same as a gallery

Thanks in Advance 
TQA

1 ACCEPTED SOLUTION

Accepted Solutions
v-yujincui-msft
Community Support
Community Support

Hi @TobiasSQA ,

 

Do you want to show all items while using a Drop Down Control?
Maybe you might consider creating a collection and setting the Items property of the Drop Down Control to it.

 

I have made a test for your reference.

1. Here is my data source.

vyujincuimsft_0-1649834049902.png

2. Select the Screen and apply the following formula on its OnVisible property as:

ClearCollect(collectionWithBlank,{Value:""}); Collect(collectionWithBlank,Choices(tmplist.status))

3. Select the Drop Down Control and set its items property to collectionWithBlank.

4. Select the Gallery and apply the following formula on its Items property as:

If(IsBlank(Dropdown2.Selected.Value),tmplist,Filter(tmplist,Dropdown2.Selected.Value=status.Value))

Result Screenshots:

vyujincuimsft_1-1649834627162.pngvyujincuimsft_2-1649834658582.png

 

Best Regards,
Charlie Choi

View solution in original post

2 REPLIES 2
v-yujincui-msft
Community Support
Community Support

Hi @TobiasSQA ,

 

Do you want to show all items while using a Drop Down Control?
Maybe you might consider creating a collection and setting the Items property of the Drop Down Control to it.

 

I have made a test for your reference.

1. Here is my data source.

vyujincuimsft_0-1649834049902.png

2. Select the Screen and apply the following formula on its OnVisible property as:

ClearCollect(collectionWithBlank,{Value:""}); Collect(collectionWithBlank,Choices(tmplist.status))

3. Select the Drop Down Control and set its items property to collectionWithBlank.

4. Select the Gallery and apply the following formula on its Items property as:

If(IsBlank(Dropdown2.Selected.Value),tmplist,Filter(tmplist,Dropdown2.Selected.Value=status.Value))

Result Screenshots:

vyujincuimsft_1-1649834627162.pngvyujincuimsft_2-1649834658582.png

 

Best Regards,
Charlie Choi

Hello Charlie 

 

Sorry for the late response, your solution worked flawlessly, thank you so much 🙏

 

Best Regards,
Tobias Andersen

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,254)