cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Siyaho
Advocate II
Advocate II

How to show all items in gallery before clicking on filter

Currently, I am fetching data from a table, but when I enter the screen, the gallery is empty. Only if I choose a button, it shows the results...

 

How can I have some 'default' value when I enter the screen or - even better - show all items from the table? I tried to set the visible parameter, but nothing seems to work.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @Siyaho,

Do you want to display different sources in different screens?

 

If so, please set the OnVisible property of each screen where you want to display different sources, so that a source will display in the Gallery once you navigate to this screen.

Best Regards,
Qi

View solution in original post

10 REPLIES 10
Raksh1Wadel
Resolver I
Resolver I

Hi,

Go through this link. you get proper solution.

PowerApps Gallery Control Filter Example - SPGuides

If this post helps, then please consider Accept it as the solution to help the others and consider giving it a "Thumbs Up."

Where, what exactly? What snippet? I tried them before...

 Hi @Siyaho,

Could you please share  bit more about your app configure?

How you set the Items property of the Gallery and why you have to click a button to display the Gallery items?

 

Generally, a Gallery has its Items property to display as it is set, like I set the Items property with a SP list name, then the Gallery will automatically display all the items within.

 

There must be some extra settings for the Gallery or the Button that you do not tell us.

 

Best Regards,
Qi

This is the gallery item code:

Search(HeedCollection, TextInput3_5.Text, "title"

This is the button code:

ClearCollect(HeedCollection, RSS.ListFeedItems("MYFEEDHERE"))

I don't know how to set the RSSfeed into a collection and then do a search on this collection.... it seems like I am not setting the collection properly.

 

There are three elements: a button, search and the gallery itself.

 

Crazy thing = if I change HeedCollection with the actual RSS feed, it works. But then, the search is super slow.... 😞

 

Does this help?

Hi @Siyaho,

If you want to display all the items within the Gallery when there is nothing input within the TextInput3, please modify your formula as below:

If(!IsBlank(TextInput3_5.Text),Search(HeedCollection, TextInput3_5.Text, "title"),HeedCollection)
Best Regards,
Qi

I tried this, but it did not work. For HeedCollection, it says: "we did not find any data"

 

Again, if I change HeedCollection to the direct link of my RSS feed, it works... why is that and how can I change that? It seems like I can not set the RSS feed to that variable. Where do I have to do this?

Hi @Siyaho,

I get what you mean! I think the collection should be generated on the OnStart property of the App so that once the app is on, the HeedCollection appears. Then you could display the Gallery as you search in the search box.

vqiaqimsft_0-1645779832108.png

 

Best Regards,
Qi

Oh wow, this is interesting. But what if I have multiple sources per page? There is only one app, of course... but some pages are fetching other lists from different feeds. How to do that?

I mean like: can we do something like this:
If (Screen1),

Set(
ClearCollect(HeedCollection,
RSS.ListFeedItems("MyRSSfeed"))
)

If (Screen 2),

Set(

ClearCollect(HeedCollection2,
RSS.ListFeedItems("MyRSSfeed"))
)

 

Etc? Or only one source?

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 (1,870)