In this blog, we will discuss how we can open any specific screen in the PowerApps canvas app. This is the most required feature when you want to show some specific user only the content that they are intended to see not the whole app.
To achieve this, PowerApps have one function called Param. This function is used to get the value from the URL query.
In the following demo, we will define Param in the app’s OnStart so that when the app loads it will check the query and navigate to the specific screen and get the specific item to show.
Demo
In this demo, I have 2 screens and I want to redirect other users into the second screen.
So in the App’s OnStart, I will write the following syntax –
If(Value(Param("screen"))=2,Navigate(Screen2))
Note: The Param function receives values as strings so if you want an integer then we have to convert it using the Value function.
After that, save and publish the app.
Copy the app’s link and add a query into the app’s URL. The final URL will look like this.
https://apps.powerapps.com/play/{AppID}?tenantId={TenentID}&screen=2
It will now open the app with screen 2.
Conclusion
You can define as much as Param function to Navigate, get data from Data Source, etc.
For more information about “Param” function click here
Well, That’s the end of this post. Let me know if you have any query or suggestion in comment below. I’ll see you next time. You can reach me at dipak@powersolution.dev
Hi I've done this but navigate function is not allowed in Onstart property
Thank you for your comment! You're absolutely right—this post was written back when the Navigate function was commonly used in the OnStart property of the app. However, with recent updates to Power Apps, we now handle navigation using the StartScreen property instead.
StartScreen: If(Value(Param("screen")) = 2, Screen2)
This allows you to conditionally navigate to different screens at app launch, making the process more streamlined and efficient.
Thanks for bringing this up, and I'll update the post to reflect the latest practices!