Hello,
I am attempting to follow a tutorial by the great Shane Young on deep linking to a specific record, but am having trouble. I'm tagging Hardit, but would welcome help from anyone if he is otherwise occupied.
Here is my OnStart formula:
Set(varProjectID, Value(Param("ProjectID")));If(varProjectID<>0, Set(varRecord, LookUp('Tool Design Support Requests',ID=varProjectID));Navigate('Edit Request Screen'))
Here is my gallery nav icon formula where the varRecord variable is set:
Set(varRecord,ThisItem);Navigate('Edit Request Screen',Transition.None)
And finally, here is the OnSuccess formula of my form which resides on the Edit Request Screen. The formula works in the sense that it sends the email with the proper formatting, but when the link is clicked it takes me to the home screen of the app versus the edit screen for the record.
I have removed the actual GUID and Tenant ID references for the sake of confidentiality, but of course they are present in the app. This screen has 4 tabs/4 forms so I would love to deposit the user on the Designer tab if possible. Can you let me know if that is a possibility?
If(Not(varProjectStatus = varNewProjectStatus),
Office365Outlook.SendEmailV2(varUser.Email,"Tool Support Design Request: " & txtRequestTitle.Text & " project status has changed",
"The status of your tool design support request has changed to " & varNewProjectStatus & ". Here is a <a href='https://apps.powerapps.com/play/GUIDSTRING?tenantId=TENANTID&ProjectID=" & varRecord.ID & "'>link to the project</a>. Please take a look at your earliest convenience.",{Importance:"High"}))
The correct Project Name comes through in the email and the correct Project ID is in the url of the link (Chicken Coop SharePoint ID is 170) so I feel like I am close. I've attached screenshots of the email and url for your review. If you could help me get over the last hurdle, I would be very grateful.
Kind regards,
Teresa
Please post this on a new thread (you can link this one for reference if you want to) as this one has been closed.
@tagustin2020 @Anonymous I followed exact same steps but I'm getting below error when I try to click on any record on my app Gallery. Also when I try to do same action from power apps studio as app creator, I don't see same error but it just take me to same record every time I select different record.
"Getting your data"
here is what I added on Item property varRecord, form works fine if I change Item property to BrowseGallery1.Selected but deep linking won't work.
Well done on getting it working, this was a real challenge! Also, thank you for posting your solution back here, as you say, it will provide others with guidance if/when they go looking to use Deep Linking.
All the best.
Thanks @tagustin2020 Theresa,
One small thing you mentioned - I do all of my code "practice" in NotePad++ and do not have any issues with character translation.
@Anonymous
Hello,
Thank you so much for your advice. I was able to get the deep links working today. Here is a recap of what worked for any other folks who come across this post while trying to sort out deep links. You mentioned things that aren't in the tutorials I referenced below so they were key to my success. I can't thank you enough!
LINK TO NEW REQUEST FORM
Video recommendation: April Dunnam’s Deep Linking tutorial
https://www.youtube.com/watch?v=EZyxlYtzqTQ
Step 1: I went to the Details screen of my app and clicked on the url. I added &hidenavbar=true&DeepLink=NewRequestForm to the end of it.
Step 2: I went to the OnStart property of my app and entered:
If(Param(“DeepLink”)=”NewRequestForm”,Navigate(frmNewRequest),Navigate(Home Screen))
Things to be aware of:
Step 3: I went to my SharePoint site and created a new page. I entered a note into the default Text webpart and then added a “Call to Action” webpart. I inserted the deep link to the new form into the webpart and chose a stock image for the background.
LINK TO A SPECIFIC RECORD
Video recommendation: Shane Young's Deep Linking tutorial
Step 1: I modified the url to include &hidenavbar=true&varRecord= at the end of it.
Step 2: I added an email formula to the OnSuccess property of my form.
OnSuccess formula:
If(
Not(varProjectStatus = varNewProjectStatus),
Office365Outlook.SendEmailV2(
varUser.Email,
"Tool Support Design Request: " & txtRequestTitle.Text & " project status has changed",
"The status of your tool design support request has changed to " & varNewProjectStatus & ". Here is a <a href='https://apps.powerapps.com/play/myGUIDandtenantIDdeletedforprivacy&hidenavbar=true&ProjectID=
"& varRecord.ID & "'>link to the project</a>. Please check the Designer and Comments tabs for more details.",
{Importance: "High"}
)
)
Step 3: Enter the following formula into the OnStart property of the App:
Set(varProjectID,
Value(Param("ProjectID")));
If(varProjectID <> 0,
Set(varRecord,LookUp('Tool Design Support Requests',ID = varProjectID));
Navigate(EditScreen));
Things to be aware of:
That's great to hear. Yep, sometimes PowerApps does some things that you can spend hours trying to troubleshoot only to save&close then re-open and BOOM! all fixed! It can be quite frustrating.
I now use a dev technique where I've tried everything I know and it should be working - I just save & close and re-open. Works a treat most times, haha.
Let us know if you get stuck again and happy PowerApp'ing 🙂
@Anonymous
Hi Eelman,
Good news! The app seems to be working correctly with the change of the Header Text property to "Project: " & varRecord.'Request Summary Title'. It wasn't synching right after I first made the change, but later that night I tested the app and I tested it again this morning and it is working. The reason I had mentioned Microscope Mount yesterday afternoon was in case there was some kind of "LastSubmit" connection since usually if there is a mismatch, it is the first record in the SharePoint list showing up, not the latest record I worked on.
Because you asked, the OnSelect properties of my tabs are all like this sample from the Request tab. There is no reference to varRecord. As you can probably tell, the second part of the formula simply controls which icon is displayed based on the form mode.
Set(varFormTab, "Request"); If(frmRequestVE.Mode=FormMode.View,IconReqVEEdit,IconReqVESave)
The Visible property of the Request form is: varFormTab="Request". I follow the same model for the other forms.
I think I am good to go on the mismatched ID issue for now, I'll let you know if it rears its ugly head again. Next, I will work on trying out your Deep Link advice for the new and edit scenarios I'm working on.
Thank you very much!
Teresa
Great to hear you and your property is OK. Here's hoping it stays that way!
What do you mean when you say " ... I get Microscope Mount which is the latest form I worked on. ..."? How were/are you working on this item/record? There maybe a clue here.
My first thought was that the Items property wasn't set to varRecord but you have confirmed that it is so there goes that idea.
What about the code for the various tabs? Is that setting Gallery.Selected or some other code ... clutching at straws here.
@Anonymous
Hello there! The air is still filled with smoke, but my house is still standing and I haven't had to evacuate (knock on wood) so life is good at the moment. I'm still struggling to get my form header and forms to match up. I've attached a Word doc that shows all the varRecord references and also my Edit Screen OnVisible formula in case that helps. I have a meeting with the engineers Thurs, Sept 17 at 2pm so I would love to get this solved before then if possible, but if you can't reply right away no problem. I know you have busy lives too! I just wish I could figure out why I'm having so many problems syncing up my records.
I'll work on the Deep Linking advice you gave me tomorrow morning while I'm waiting to hear back from you. Take care and have a nice evening!
Teresa
WarrenBelz
78
Most Valuable Professional
mmbr1606
41
Super User 2025 Season 1
MS.Ragavendar
38