
Hello everyone,
I'm currently in a team that's building front-end solution with Power Apps for the first time. Because of collaboration reasons we're using Component Factory, so we can work on different functionality at the same time.
So, right now I'm calling the REST service with the function: ClearCollect(HumidityData, getNewestHumidityData.Run()). This is nice and all because the needed API data is displayed in a label, but as of now it's implemented in a way that it works only when something is clicked.
My question is - how do I call this function and update a label with the response data without clicking anywhere? And once this is achieved I want to keep updating this label real-time every time new data comes in from the API. Keep in mind that I'm doing this in Component Factory so there is no App module which functions can be called.
Any suggestions?
Hi,
you can call the API on Screen Load.
Set(HumidityData, getNewestHumidityData.Run());
Click on Screen and Go to OnVisioble Properties and Place the above code
Or On On AppLoad you can also use the Same code and assign the Same to Label
For On APP Load Click on APP and OnSatart Property Place the above code.
and Assign "HumidityData" variable to label .
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."