cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Meneghino
Level 10

Issue: gallery Default property working with collection but not live data source

As you can see in this thread started by @lifelongjourney the Default property of a gallery will not work properly if the Items are a live data source but will do when the Items are a collection cached in memory.

It would be great if this could be investigated/clarified/resolved.

Many thanks for the efforts of the programme team.

6 REPLIES 6
Community Support Team
Community Support Team

Re: Issue: gallery Default property working with collection but not live data source

Hi @Meneghino,

 

I checked the thread you referenced.

And tried the method you have discribed in that thread.

And based on my understandings, the Default property expects a record value, and use first() or the Last() function directly on the data source works from my side.

With no errors occurred in PowerApps studio, and the Default would show me the filtered item after I specify the formula.

39.PNG

I may not get the point here, and if convenient, please share the steps to reproduce the scenario.

Regards

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Meneghino
Level 10

Re: Issue: gallery Default property working with collection but not live data source

Hi @v-micsh-msft thanks for following up.

Here are the steps.  My data source is an Access Web App table, but in the thread by @lifelongjourney the source was a SharePoint list. The result is the same.

 

  1. Create a blank app with just one screen, and connect your data source
  2. Create a gallery and set its Items property to MyDataSource and Default to Last(MyDataSource)
  3. Create a text box in the gallery template to show the title/Id column of MyDataSource, i.e. ThisItem.Title
  4. Create a text box outside the gallery (TextboxLast) and set its Text to Last(MyDataSource).Title
  5. Create another text box outside the gallery (TextBoxSelected) and set its text to Gallery1.Selected.Title
  6. Save, close and re-open the app

Now, TextBoxSelected is blank when the app is opened, but if Default was working properly then it should show the same as TextBoxLast.  This is the problem.

 

I have just done the above again and the result is the same.  I am very surprised that in your case it works, what is your data source?

 

__.JPG

Community Support Team
Community Support Team

Re: Issue: gallery Default property working with collection but not live data source

Hi @Meneghino,

 

Thanks for the detailed responses.

I will test this again and reply back.

Regards

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Community Support Team
Community Support Team

Re: Issue: gallery Default property working with collection but not live data source

Hi @Meneghino,

 

I tested again, with some further trying out.

Data source is downloaded from the following website: Financial sample

https://powerbi.microsoft.com/en-us/documentation/powerbi-sample-download-the-financial-sample-workb...

Save this file into OneDrive or OneDrive for Business, the data is already formatted as an Excel table (Financials).

Following your guide, the Gallery1.selected.country would show me the right value with the textbox above (The same result with IOS devices):

40.PNG

 

If convenient, please help to confirm this.

I tested with the SharePoint list item, and SQL Server table also, and this time it shows the results as you mentioned, which the Gallery.selected value is not displayed under the Text box.

If there are some more aspects that should be considered, please let me know, I will then send out the feedback from my side.

Regards

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Meneghino
Level 10

Re: Issue: gallery Default property working with collection but not live data source

Hi @v-micsh-msft, thanks again for following up.

I tried with financials as you suggested and indeed Default works as expected.

No other aspects come to mind at the moment, except that a Reset property for galleries would be appreciated, as outlined here:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/Add-a-Reset-property-to-galleries/idi-p/18128

Community Support Team
Community Support Team

Re: Issue: gallery Default property working with collection but not live data source

Hi @Meneghino,

 

Issue has been reported. But currently no response.

I will update it here once I got any feedback.

Regards

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 359 members 6,519 guests
Please welcome our newest community members: