Hi @toysibuy ,
The reason why when you has not clicked one item, the form still has data is that the gallery.selected is the first item by default, no need you click one item, it will have value by default.
While the collection that is created by ClearCollect function will not have data by default automatically.
The ClearCollect function will not perform automatically until you act an action.
So if you want it has data when you has not clicked one item, you need to set this function to one action that will perform automatically.
For example: set the app's OnStart,set the screen's OnVisible, set the textinput's OnChange, set the drop down's OnChange, ect.
Could you tell me how do you filter the gallery?
If you filter the items based on constant value, for example: set the gallery's Items: Filter(....,fieldname="a").
You could set the screen's OnVisible:
ClearCollect(attaches,First(Gallery1.AllItems).Attachments)
If you filter the items based on variable, for example a textinput or a drop down.
Then ,please set the textinput's and drop down's OnChange:
ClearCollect(attaches,First(Gallery1.AllItems).Attachments)
Best regards,