cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BB9
Helper II
Helper II

Email Link takes the user to a specific screen

Hello everyone,

 

I have been trying to get this functionality to work but I am having issues:

 

Data Source: SharePoint List. I currently have multiple screens in my app. All the below screens are built as a separate Canvas App and not through SharePoint Power Apps option.

 

Filter Screen: Has drop downs, gallery with some details. When a user clicks on an item in the gallery, it takes them to the next page which is 'Display screen' - which provides additional details of the item based on the selected item in the gallery. This Display page has an Edit Icon and will take them to the 'Edit Screen' which will look just like the Display Screen but has Edit capabilities and Save. The users will be able to go tp the incident that they want using this process. This has been working great so far.

 

Scenario: I have created a Flow using Power Automate/Microsoft Flow to send an automated email with a URL (PowerApplink+ID). When the user clicks on the link, they should be taken directly to the 'Display Screen' with the details of the new item created, just like how the user is able to go to the 'Display Screen' by selecting an item in the gallery.

 

I have tried creating duplicating the display screen and changing the item, but doesn't seem to work. Any ideas?

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Most Valuable Professional
Most Valuable Professional

Hi @BB9 ,

Just got your last message - that is precisely what I do and it is not difficult.

The key is the common selection method of the required record on the screen containing this form. As you are sending the ID in the URL, this is done as per the specs below. Strangely, I actually have the same screen name as you and a different Reference.

So firstly at App OnStart

If(
   !IsBlank(Param("ItemID")),
   Set(
         vID,
         Value(
            Param("ItemID")
         )
      );             
      Navigate(DisplayScreen,ScreenTransition.Cover),   //This has the target record on it
      Navigate(YourGalleryScreen,ScreenTransition.Cover); //This has a gallery of records on it    
   )
)

This will put the ID number you want into the numeric variable vID and navigate straight to the DisplayScreen (or to the gallery screen if there in no ItemID parameter in the URL that opened the app).

Now the Item of the form displaying the record can be

LookUp(MyListName,ID=vID)

and lastly, on the OnSelect of your gallery that normally selects the item

Set(vID,ThisItem.ID);
Navigate(DisplayScreen,Fade)

So it will also display the required record by the same means.

Happy to elaborate further if required.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

22 REPLIES 22
WarrenBelz
Most Valuable Professional
Most Valuable Professional

Hi @BB9 ,

Please watch this video from Shane Young @Shanescows on Deep Linking.

It is not a difficult process. If you get stuck, I am happy to help.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Thank you @WarrenBelz. I have used Deep Linking prior to posting the original post, so I tried a different way, but still was not able to fgigure out what was going on.

 

I have watched Shane approach and implemented the exact same way and was able to make progress. However, the only think that I am still having an issue is pasing the parameter variable from the URL. I have created a flow using Power Automate and sent the URL and the URL looks correct, it has my parameter name and number. However, when the user clicks the link, they are getting redirected to my home screen and not to my detail screen. However, when I give an ID in the On Start parameter, it seems to be working. I have added a label to check if it was getting the ID and gallery based on that. I am still stuck on how to get the ID passed from the URL to the App.

 

https://apps.powerapps.com/play/-------------?tenantId=-------------------&ItemID=29

 

ItemID is my variable that I used to pass the ID value.

 

One thing to mention here - I am generating the URL in Microsoft Flow when a new item is created, so I am using the ID dynamic value available in there so it will give me the ID directly and I am passing it. The URL seems to be correct, but my Param variable is not able to capture it from the URL.

WarrenBelz
Most Valuable Professional
Most Valuable Professional

Hi @BB9 ,

I use the ID in an email link on a couple of my apps - if is assists, I below is the exact code (less the URL nos) I use when sending the ID as a Text parameter. The hyperlink part of the mail - the syntax on the double-single quotes I believe are reversed when coming from a flow content.

"A <a href='https://web.powerapps.com/apps/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx?RecordID=", & IDNoET.Text & "'><b>Timesheet</b></a> has been submitted by "

now on the incoming App OnStart

If(
   !IsBlank(Param("RecordID")),
   Set(
         vID,
         Value(
            Param("RecordID")
         )
      );             
      Navigate(DisplayScreen,ScreenTransition.Cover),   //This has the target record on it
      Navigate(DaySummary,ScreenTransition.Cover);      //This has a gallery of records on it    
   )
)

The Item property of the form on DisplayScreen

LookUp(MyListName,ID=vID)

vID is also set from the gallery if navigating from there.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

Hi @BB9 ,

Do you mean that you want to call a flow to send email with app's deep link to open a specific item in an edit form?

Do you mean that the ID in the deep link is dynamic value?

Could you tell me how do you get this dynamic value?

I assume that it is set to "ask in powerapps".

If so, I've made a similar test for your reference:

1)in flow:

trigger: powerapps

action: send an email   body:

https://apps.preview.powerapps.com/play/2....e1?tenant......?ItemId=@{triggerBody()['Sendanemail(V2)_Body']}

//applink ?ItemId= ask in powerapps

4101.PNG

 2) in powerapps

(I use a gallery's OnSelect to call this flow, and use this gallery's selected as the dynamic ID value)

set app's OnStart:

If(Not(IsBlank(Param("ItemId"))),Set(var,Param("ItemId"));Navigate(Screen2, Cover))

//edit form is in screen2

4102.PNG

 

set gallery's arrow button's OnSelect:

'410'.Run(Gallery1.Selected.ID)

//410 is my flow name

4103.PNG

 

set the edit form's Item:

If(IsBlank(var),Gallery1.Selected,LookUp(deeplink,ID=Value(var)))

//if you open this edit form by using the deep link, the edit form will display the item that the deep link is related to.

If you open this edit form by gallery, the edit form will display the gallery's selected item.

4104.PNG

 

Then if you click the arrow button in the gallery, you will send an email with this app's deep link. If you click the deep link, you will open this app and navigate to the edit form, the edit form will display one specific item.

 

Here's a blog about deep link for your reference:

https://powerapps.microsoft.com/en-us/blog/powerapps-deep-linking/

 

 

Best regards,

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
WarrenBelz
Most Valuable Professional
Most Valuable Professional

Hi @BB9 ,

Happy to continue our conversation when you respond to my post.

@v-yutliu-msft thank you for your elaboration on the matter.

Sorry about the confusion, I should have been more clear about the issue.

 

The ideal scenario would work like this. When a new item is added, I created a flow to send an automated email to the user - and it will have a new ID as it is a new item. I am sending that ID as the parameter for the URL. This is working. I was able to get the URL to show ....tenantId=....&ID=10 (or whatever the new ID is). The issue is my Power App is not picking this ID parameter from the URL.

Thank you @WarrenBelz and @v-yutliu-msft for your responses. I am going to try again based on the steps. I made my Power App way more complex with a lot of variables and screens.

 

As of now, I have filter screen which has a gallery with drop downs, when a user selects an item in the gallery, it will take them to display screen with all the info about the selected item in the previous screen. If they click Edit Icon, it will take them to a different screen where they can edit the same item.

 

I want to use the same screens to implement Deep Linking. When a new item is added, it will trigger an email with the new ID. The user clicks the link, they should be taken directly to the same display screen (just like above - where user is selecting an ID), here we are already sending the ID as the URL, so we want the user to be taken to the same display screen. Hope I am not creating confusion with this.

 

If it still doesn't work, I will try recreating the app by starting with Deep Linking first and then reuse those screens for the drop downs, search etc.

WarrenBelz
Most Valuable Professional
Most Valuable Professional

Hi @BB9 ,

Please refer to the second part of my code, which also works on the incoming ID as a parameter.

If you give me the actual requirements for what happens when your app is opening by this URL (rather than being opening normally), I can apply this to your situation.

 

Helpful resources

Announcements

Celebrating the May Super User of the Month: Laurens Martens

  @LaurensM  is an exceptional contributor to the Power Platform Community. Super Users like Laurens inspire others through their example, encouragement, and active participation. We are excited to celebrated Laurens as our Super User of the Month for May 2024.   Consistent Engagement:  He consistently engages with the community by answering forum questions, sharing insights, and providing solutions. Laurens dedication helps other users find answers and overcome challenges.   Community Expertise: As a Super User, Laurens plays a crucial role in maintaining a knowledge sharing environment. Always ensuring a positive experience for everyone.   Leadership: He shares valuable insights on community growth, engagement, and future trends. Their contributions help shape the Power Platform Community.   Congratulations, Laurens Martens, for your outstanding work! Keep inspiring others and making a difference in the community!   Keep up the fantastic work!        

Check out the Copilot Studio Cookbook today!

We are excited to announce our new Copilot Cookbook Gallery in the Copilot Studio Community. We can't wait for you to share your expertise and your experience!    Join us for an amazing opportunity where you'll be one of the first to contribute to the Copilot Cookbook—your ultimate guide to mastering Microsoft Copilot. Whether you're seeking inspiration or grappling with a challenge while crafting apps, you probably already know that Copilot Cookbook is your reliable assistant, offering a wealth of tips and tricks at your fingertips--and we want you to add your expertise. What can you "cook" up?   Click this link to get started: https://aka.ms/CS_Copilot_Cookbook_Gallery   Don't miss out on this exclusive opportunity to be one of the first in the Community to share your app creation journey with Copilot. We'll be announcing a Cookbook Challenge very soon and want to make sure you one of the first "cooks" in the kitchen.   Don't miss your moment--start submitting in the Copilot Cookbook Gallery today!     Thank you,  Engagement Team

Announcing Power Apps Copilot Cookbook Gallery

We are excited to share that the all-new Copilot Cookbook Gallery for Power Apps is now available in the Power Apps Community, full of tips and tricks on how to best use Microsoft Copilot as you develop and create in Power Apps. The new Copilot Cookbook is your go-to resource when you need inspiration--or when you're stuck--and aren't sure how to best partner with Copilot while creating apps.   Whether you're looking for the best prompts or just want to know about responsible AI use, visit Copilot Cookbook for regular updates you can rely on--while also serving up some of your greatest tips and tricks for the Community. Check Out the new Copilot Cookbook for Power Apps today: Copilot Cookbook - Power Platform Community.  We can't wait to see what you "cook" up!      

Tuesday Tip | How to Report Spam in Our Community

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   Today's Tip: How to Report Spam in Our Community We strive to maintain a professional and helpful community, and part of that effort involves keeping our platform free of spam. If you encounter a post that you believe is spam, please follow these steps to report it: Locate the Post: Find the post in question within the community.Kebab Menu: Click on the "Kebab" menu | 3 Dots, on the top right of the post.Report Inappropriate Content: Select "Report Inappropriate Content" from the menu.Submit Report: Fill out any necessary details on the form and submit your report.   Our community team will review the report and take appropriate action to ensure our community remains a valuable resource for everyone.   Thank you for helping us keep the community clean and useful!

Community Roundup: A Look Back at Our Last 10 Tuesday Tips

As we continue to grow and learn together, it's important to reflect on the valuable insights we've shared. For today's #TuesdayTip, we're excited to take a moment to look back at the last 10 tips we've shared in case you missed any or want to revisit them. Thanks for your incredible support for this series--we're so glad it was able to help so many of you navigate your community experience!   Getting Started in the Community An overview of everything you need to know about navigating the community on one page!  Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Community Ranks and YOU Have you ever wondered how your fellow community members ascend the ranks within our community? We explain everything about ranks and how to achieve points so you can climb up in the rankings! Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Powering Up Your Community Profile Your Community User Profile is how the Community knows you--so it's essential that it works the way you need it to! From changing your username to updating contact information, this Knowledge Base Article is your best resource for powering up your profile. Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Community Blogs--A Great Place to Start There's so much you'll discover in the Community Blogs, and we hope you'll check them out today!  Community Links: ○ Power Apps ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Unlocking Community Achievements and Earning Badges Across the Communities, you'll see badges on users profile that recognize and reward their engagement and contributions. Check out some details on Community badges--and find out more in the detailed link at the end of the article! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio    Blogging in the Community Interested in blogging? Everything you need to know on writing blogs in our four communities! Get started blogging across the Power Platform communities today! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Subscriptions & Notifications We don't want you to miss a thing in the community! Read all about how to subscribe to sections of our forums and how to setup your notifications! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Getting Started with Private Messages & Macros Do you want to enhance your communication in the Community and streamline your interactions? One of the best ways to do this is to ensure you are using Private Messaging--and the ever-handy macros that are available to you as a Community member! Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Community User Groups Learn everything about being part of, starting, or leading a User Group in the Power Platform Community. Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Update Your Community Profile Today! Keep your community profile up to date which is essential for staying connected and engaged with the community. Community Links: ○ Power Apps  ○ Power Automate  ○ Power Pages  ○ Copilot Studio   Thank you for being an integral part of our journey.   Here's to many more Tuesday Tips as we pave the way for a brighter, more connected future! As always, watch the News & Announcements for the next set of tips, coming soon!

Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp  

Top Solution Authors
Top Kudoed Authors
Users online (6,143)