
Hello,
I have a multi-page app that displays data from multiple SQL tables (which without a flow using a gateway the users of the app will have no access to).
So, I create collections using flows and the Parse JSON function inside PowerApps that will hold the data I want to display.
On several different pages, there are actions that will trigger flows that make changes to these tables.
I could now on each page put a button with 3 pages of code to trigger the flows that gather the new data and then ClearCollect. I would like to write the code for each of these functions only once and then use them all over the app.
I understand that I can create components for example for mathematical functions that I can give a value to, and they will return a changed value. I also found that I can return tables from the component to the app.
However, I don't know how to write a custom function/component that can be triggered by a button outside of the component and then return the collection that I need to the app.
One workaround that I can imagine is that I have the button navigate to a loading screen, inside that loading screen there are invisible buttons for each function that are pressed and then I navigate back to the original page.
Is that how I should do it, or is there a more elegant solution?
Hi @schwibach,
Have you resolved this?
To trigger outside a component by a button, you just need to run the flow clicking the button uding the FlowName.Run(control_input.Text)
If you have resolved your problem, I will mark your topic as resolved.
Thanks for your cooperation.