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.
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.
I may not get the point here, and if convenient, please share the steps to reproduce the scenario.
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.
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?
Thanks for the detailed responses.
I will test this again and reply back.
I tested again, with some further trying out.
Data source is downloaded from the following website: Financial sample
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):
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.
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:
Issue has been reported. But currently no response.
I will update it here once I got any feedback.
Keep your eyes open for our upcoming T-shirt design contest!
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020