We all have been in a position where we are integrating Power Apps with a solution and we need to Pass certain variables to Power Apps.
This is something i explained in my blog Integration Power Apps with Omnichanel but in this blog i will go in a little detail.
So We will make a simple Power App that will take a customer name and his email from outside and then will work on that data.
So lets create our Canvas Power App
Now, on the Default Property of the Name Input field i want to use the Value that i will provide from outside. So we will use the Param Function. The Syntax is Param(“VariableName”). This variable name will be the parameter that will be passed on in the url along with the data for it
Now, to test this simple application and i will publish it. After publishing it i will get a URL Like
So we need to pass our two variables for this Application VIA this URL such as
So this works perfectly, Now let me show you how can we make an app so that we can directly open screens based on the parameter value.
So on my App OnStart button i will define the parameter page so that i can get the page number as soon as the app Launched. I will save that in a variable and then perform simple If Function.
The data type of Param will always be string.
I have created two screens in my App with different tittles. Now lets test out our application
So with this simple trick i am able to pass parameters and values to my power app. Please note that this method only works when you are starting the application for the first time. Currently there is no way to send data to Power App if it has already loaded except through Power automate.