@WebPortal
Yes, you can do this easily in a couple different ways. One of the easiest is to simply Select the button in the OnVisible action of the screen - Select(yourButton)
Another way to simulate functions is with the use of a toggle. We do this one very often.
The concept is to utilize a variable to determine the function to perform.
Example, a variable called lclFunction. We would set the variable as such UpdateContext({lclFunction:"ResetScreen"})
The toggle has a Default property of !IsBlank(lclFunction) and then in the OnCheck action of the Toggle is a formula such as this:
Switch(lclFunction,
"ResetScreen",
Reset(control1);
Reset(control2), //etc
"RefreshData",
Refresh(dataSource),
"SubmitData",
SubmitForm(form1)
);
UpdateContext({lclFunction:Blank()}) // note, this is important in your OnCheck action.
So, setting the lclFunction variable anywhere in the screen will fire the toggle and the named action will happen.
It's kind of a "semi-function" concept and it really serves to put Formulas in one place rather than many hard to find places.
So, in your case, you can put your Formula in the toggle OnCheck and in the OnVisible of the screen you can put a formula such as : UpdateContext({lclFunction:"myButtonFormula"}) Then on the OnSelect of the Button the same thing: UpdateContext({lclFunction:"myButtonFormula"})
The concept works well and is clean. The nice part is you can consolidate a lot of formulas in one place for easier maintenance.
I hope this is helpful for you.