@Anonymous
No entirely following you, but I am surmising that you are saying the Gallery is in a component?!
If so, then you need to put this logic into your component.
There is no clear way to go about it in the component except to perhaps utilize the OnReset action in the component and place the Select formula there. Then, create a Parameter on the component like Reset and set the "raise OnReset when value changes".
Then, in your app in the OnVisible, change the Reset property of the component to fire off the Select inside of your component.