I am having 2 Galleries, the one is 'Filter Gallery' and the second one is 'Filtered Items'. The Filter gallery works until I Select any Item in Filter Gallery. What I need is to show All Items in 'Filtered Items' by Default.
The image you attached comes up with an error, and your subject seems to be different to what you've said in your message so I'll try answer with what I know.
For the request in the subject "set default selection to first item";
You can do this by setting the Default property of the FilterGallery to
If your FilteredItems Gallery is based on what is selected in the FilterGallery, then it should automatically filter based on the above - but it depends on the your Items property function. What is it set to?
Bear in mind the "Default" parameter is triggered on reset, so if you wish to reinforce the default after the first time the page is rendered, you would need to use the Reset property of the Gallery and trigger it manually.
To your second question;
"The Filter gallery works until I Select any Item in Filter Gallery. What I need is to show All Items in 'Filtered Items' by Default. "
I'm not sure what you mean by 'works until I select any item in the filter gallery'.
Can you try upload the image again?
Thanks for reply RT, Actually I was trying to ask for set default selection to the first item in a gallery. The second Question is an issue actually, the filtered items show a blank screen until I click on any item of Filtered Gallery, as You can see in my attached Image.
Also, First(tableName) didn't work for me.
It may be because the Default property is only used for first-time-render or Reset. You won't trigger Default again unless you restart the app, or manually reset the gallery.
To test with a manual reset, add a button to the screen and set it's OnSelect property to;
Make sure the Default property of FilterGallery is set to
Where DataSourceName is identical to the Items: property value of the Gallery.
As an additional debug option, you can place a text label on the screen and set it's Text property to;
and pick a field from the record (eg: FilterGallery.Selected.Title or FilterGallery.Selected.ID) - but you already have a gallery based on FilterGallery.Selected so you probably don't need the text label.
Run the screen and select a few different items to see if your label and/or items gallery updates properly. Then hit the button to see if it resets the selection it to the first item and updates the items gallery.
Could you paste your code for the Items property of both of the Galleries, I have a feeling it will be around the filtering part that your issue arises.
Without seeing your code I can only give you a general idea, but would help a lot if I could see what you have set up.
You should be able to do something like this:
GalleryFilter = FilterGalleryDropDown.Selected.Value,
FilterItems.Selected.Value = "All Items"
Title = FilterItems.Selected.Value
The Logic with this being that you are either filtering by the selection "All Items" which then returns 'true' and shows all items instead of filtering, or you are filtering by whatever item has been selected.
SortByColumns(If(type="All",Tickets,If(type="Closed", Filter(Tickets,Status="Closed"),If(type="Active",Filter(Tickets,Status="In Progress"),If(type="On hold",Filter(Tickets,Status="On Hold"),If(type="Not started",Filter(Tickets,Status="Not Started")))))),"Created",Descending)
The Above code is of Items property of Filtered Gallery(Here 'Tickets' is a SharePoint List), while in Filter Gallery I am just calling a SharePoint List
Do you want to set the default selection to the first item of your data source within your Filter Gallery?
I have made a test on my side, and don't have the issue that you mentioned. The screenshot as below:
For your first question, if you want to set the default selection to the first item of your data source within your Filter Gallery, please take a try with the following workaround:
Set the Default proeprty of the Filter Gallery control to following:
Note: The TicketTypes represents the data source you typed within the Items property of the Filter Gallery.
For your second question, do you use your SP list data source within the "Filtered Items" Gallery (Tickets Gallery) of this template app (Service desk) instead of Original embedded Excel table?
The Original embedded data sources (e.g. TicketTypes, Tickets, etc) within this template app are all Excel table data source as below:
If you want to replace the Original embedded Excel table data source with your SP lists within this template app, please make sure your SP lists have same data structure as that within the Original embedded Excel table data sources as below:
On your side, you could consider take a try to save this embedded Business Excel table data sources into your OneDrive folder (or OneDriver for Business, Dropbox, etc), then create your SP lists based on the data structure of these embedded Business Excel tables. After that, add your SP lists into this template app, then save and re-load this template app to check if the issue is solved.
Note: You could find the embedded Business Excel tables through the following folder path:
Your OneDrive Root folder -> PowerApps folder -> Templates folder -> ServiceDesk_eaxxxxxx-de38-xxxx-b1d7-58ef8d75xxxx -> data.xlsx
I have already tried that Solution but it didn't helped me.
"do you use your SP list data source within the "Filtered Items" Gallery (Tickets Gallery) of this template app (Service desk) instead of Original embedded Excel table?"
Actually I created this app from scratch, using SP list as a data source.
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
The largest Power BI, Power Platform, and Data conference in New Zealand