cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Community Champion
Community Champion

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
Highlighted
Community Support
Community Support

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.
Highlighted
Community Champion
Community Champion

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

Highlighted
Community Support
Community Support

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.
Highlighted
Community Support
Community Support

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.
Highlighted
Community Champion
Community Champion

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

Highlighted
Community Support
Community Support

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
Community Conference

Power Platform Community Conference

Find your favorite faces from the community presenting at the Power Platform Community Conference!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,848)