web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Issue: gallery Default...
Power Apps
Unanswered

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

(1) ShareShare
ReportReport
Posted on by 6,949

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.

Categories:
  • v-micsh-msft Profile Picture
    Microsoft Employee on at

    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

     

  • Meneghino Profile Picture
    6,949 on at

    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

  • v-micsh-msft Profile Picture
    Microsoft Employee on at

    Hi @Meneghino,

     

    Thanks for the detailed responses.

    I will test this again and reply back.

    Regards

  • v-micsh-msft Profile Picture
    Microsoft Employee on at

    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-workbook/

    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

  • Meneghino Profile Picture
    6,949 on at

    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

  • v-micsh-msft Profile Picture
    Microsoft Employee on at

    Hi @Meneghino,

     

    Issue has been reported. But currently no response.

    I will update it here once I got any feedback.

    Regards

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 339 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 289

#3
Mohsin Ali Profile Picture

Mohsin Ali 228

Last 30 days Overall leaderboard