Introduction
In this article I am going to explain how to provide a link which will help to navigate a specific screen of your application from the email body in PowerApps.
Overview
- Pass the item id along with the app link to display the record from the link in the email body
- Set a timer controller on landing screen, navigate to a predesigned screen after a specific duration of the timer with the passed id
- Query the item details with help of passed ID and display it in the screen
Create a PowerApp for Desired List
I created a SampleList here with the following 2 columns and data: (When you Exit Classic Experience you will get the options like Flow, PowerApps as below),
Create an app, named As AppForDeeplinking
Now duplicate the DetailScreen1 and Rename as DetailScreenForSpecificID
Let's do the actions as follows on the home screen:
- Add a Timer Control and set Visible as False
- Write the syntax on OnTimeEnd of the Timer Controller as below:
OnTimeEnd
- If(Not(IsBlank(Param("ItemId"))), Navigate(DetailScreenForSpecificID, Cover, {
- Samples: LookUp(SampleList, ID = Value(Param("ItemId")))
- }))
Where ItemId is a user defined parameter, DetailScreenForSpecificID is a predesigned screen to display the specified item, and SampleList is our list
- Set the duration of the timer as fast as you want, let's set it as 6 as below,
Duration-6
- Set AutoStart as True as below,
AutoStart - true
I have set those as mentioned above,
Now come to DetailScreenForSpecificID screen.
Click on DetailForm1_1 which is added by default when we duplicated the screen
Set the item with the Syntax First (Filter(SampleList, ID = Value(Param("ItemId"))))
Item
- First(Filter(SampleList, ID = Value(Param("ItemId"))))
Where the SampleList is our list and ItemId is defined in home screen, the result is:
Now publish the app and pass the link as formatted below in mail or anywhere else to click to navigate the specific item:
Syntax
https://web.powerapps.com/apps/{AppId}?{Parameter}={ItemId}
Where my app id is 9d7d3c39-90ca-4bd1-b2ed-cd658caeda96
Let's say I want to display the item number as 1, so the resulting URL is as below
https://web.powerapps.com/apps/9d7d3c39-90ca-4bd1-b2ed-cd658caeda96?ItemId=1
Where, ItemId is our defined parameter,
1 is Item Id which I wanted to display
9d7d3c39-90ca-4bd1-b2ed-cd658caeda96 is App Id
So when I pass the above Url on a button click in email body it will show the item number 1 details as below,
Hence, we have done the deep linking to navigate a specific screen to display the specified item.
Conclusion
This article will help us to set the link in email bodies which will navigate to the specific screen where the specified item is displayed. You can pass the ID dynamically with the help of flows to emails.
Thank you.