In this Pragmatic Works tutorial, Nate Halliwell, Senior Trainer, demonstrates how to create deep links in Canvas applications. Deep linking allows users to navigate directly to a specific screen within a Canvas app and even pre-load a particular item, streamlining workflows such as approvals.
Introduction to the Example
Nate uses a simple Canvas app designed to track PTO (Paid Time Off) requests. In the demo, he submits a sample PTO request for "Nate needs a vacation" and demonstrates how a Power Automate flow can notify the approver by email when a new request is submitted.
Setting Up the Base URL
- The base URL of a Canvas app is essentially the link to the app itself, e.g.,
www.myapp.com. - Parameters can be added to the URL using a question mark (
?) to indicate the start of parameters. - Additional parameters are separated with an ampersand (
&), e.g.,?approval=1&ItemID=19.
Using Parameters for Conditional Navigation
Nate explains that parameters allow the app to determine which screen to open. For instance:
approval=1indicates the approver is opening the app.ItemID=19specifies the PTO request item to load.
These parameters help bypass the default home screen and navigate directly to a specific approval screen.
Configuring the Start Screen
- In the Canvas app, the
StartScreenproperty determines which screen appears when the app opens. - By default, apps go to the first screen, but using the
Paramfunction, you can conditionally open another screen. - Example logic:
If Param("approval") is blank → Go to Home Screen
If Param("approval") is not blank → Go to Approval Screen
Loading a Specific Item into a Form
Once the app navigates to the approval screen, Nate shows how to pre-load the item specified in the URL parameter:
- Create a global variable (
VAR_ItemID) in theOnStartproperty. - Use a lookup function to find the item in the SharePoint list by converting the parameter (string) to a number.
- Set the
Itemproperty of the form to this variable, ensuring the correct record displays automatically.
Integrating with Power Automate
- The Power Automate flow triggers when a new PTO request is added.
- It sends an email to the approver containing the deep link with
approvalandItemIDparameters. - Clicking the link opens the app directly to the approval screen with the relevant request pre-loaded.
Testing and Publishing
- Nate demonstrates submitting a test request and verifying that the email link correctly opens the app to the approval form.
- This confirms that both navigation and pre-loading of items work seamlessly.
Use Cases and Benefits
- Deep linking improves efficiency for approvers, managers, or any users needing direct access to specific screens.
- This approach can apply to approvals, edits, reviews, or other workflows where specific items need quick access.
- Users no longer need to manually navigate through the app to find a record.
Nate concludes by encouraging viewers to apply these techniques to their own Canvas apps and highlights the versatility of deep links in various scenarios. For more tutorials, he invites viewers to like and subscribe to Pragmatic Works’ YouTube channel.
Don't forget to check out the Pragmatic Works' on-demand learning platform for more insightful content and training sessions on Canvas Apps and other Microsoft applications. Be sure to subscribe to the Pragmatic Works YouTube channel to stay up-to-date on the latest tips and tricks.
Sign-up now and get instant access
ABOUT THE AUTHOR
Nate Halliwell is a Power Platform enthusiast, specializing in Power Apps and Power Automate. He began his journey into the Power Platform as a “Citizen Developer” while working as a recruiter in talent acquisition. He used Pragmatic Works to train himself on the technology and hopes to use this new role as a trainer to help others achieve similar career transitions! Nate is PL-900 and PL-100 Certified, and ready to help you take on any Power Apps or Power Automate challenges you or your organization are currently facing! Outside of work, Nate is a husband, a father to 2 boys, and a beer league hockey player.
Free Community Plan
On-demand learning
Most Recent
private training

Leave a comment