cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
spow
Frequent Visitor

Deep Link to Record Not Working - Goes to Home Screen

Hello Everyone

 

I'm reaching out in the hope that someone can help, I've spent hours trying to get this issue to work and am on the point of giving up!

 

My App

I have created an app which contains a form and repeating lines and authorisation selection. The form connects to one Sharepoint list (parent) and the repeating lines to another (child), I have managed to link the ID to both as one form entry can have numerous repeating line entries.

On submission, this writes back to the Sharepoint lists and this will trigger the approval workflow. This is working perfectly.

 

The approvers get the standard approval email but will need details of the request, not just the form but the repeating lines also. 

 

I watched Shane Young's deep link video and this was really helpful but not quite my scenario as I am not emailing through a button in Powerapps but via the workflow. I therefore created a variable in the workflow to create the email link.

 

Here are all the "ingredients" of my deep link:

 

App On Start:

 

If(!IsBlank(Param("gcrID")),Set(varGCRID, LookUp('parentdatasource', ID = Param("gcrID")));
Navigate(MyApprovals));
 
MyApprovals 
This is a gallery(1) and connects to my parent datasource  - currently not filtered but will need to be to filter to the approvers items.
The onselect on that gallery is set as:
 
Set(varGCRID, ThisItem)
 
There is another gallery(2) which connects to the child datasource, the items are set as:
 
Filter('childdatasource', MasterID = varGCRID.ID)
 
When I click on gallery(1) this populates gallery(2) with the child item.
 
My Flow
 The trigger is when a new item is created in the parent datasource. I have a variable which creates the approval link with the value:
 
 
The Issue
Everything works correctly and the variable picks up the correct item id. However when the link in the approval email is clicked (View Request), this takes me to the landing page of my app. This tells me that the param is not being read, only the main weblink.
 
Can anyone shed any light as to where I have gone wrong, I've trawled through so many articles on this and on the face of it it all looks right. I am self taught in Powerapps and pretty pleased with what I have built,  I just need this final piece of the jigsaw to fit.
 
Thank you to anyone that takes time to look at this. 
 
 
 
1 ACCEPTED SOLUTION

Accepted Solutions

@spow 

I opened up one of my working deep linking apps to check and this works for my, slightly different to your structure though

 

// Set variable using parameter
Set( vGcrID, Value(Param("gcrID")));

// Check for ID, Navigate if present
If( vGcrID <> 0,
   Set(varGCRID, LookUp('parentdatasource', ID = vGcrID));
   Navigate(MyApprovals, CoverRight)
);

 

I think PowerApps wants you to set the Param as a Variable first before using it, at least that's what has worked for me.

 

From memory, I had to use Value() to sort a similar issue to yours. I now also wrap any text Param's in the Text() function, just to be sure.

View solution in original post

4 REPLIES 4
Eelman
Super User
Super User

@spow 

A couple of things you could try:

 

- Is your App OnStart code at the top of all your App OnStart code. It must be the the first thing it encounters

 

- is there a space in your URL? I've found in the past that the app stops 'reading' the URL at the first space it encounters

 

- review the URL that opens the app and make that the parameter is actually there and is correct

 

 

spow
Frequent Visitor

Hi

 

Thank you for replying.

 

Yes it is the first code in my App onstart, no spaces in URL and the link in the approval email generates this:

 

https://apps.powerapps.com/play/**myweblink**?tenantId=**mytenantid**&hidenavbar=true&gcrID=320

 

This is why it is so frustrating as all looks ok.

@spow 

I opened up one of my working deep linking apps to check and this works for my, slightly different to your structure though

 

// Set variable using parameter
Set( vGcrID, Value(Param("gcrID")));

// Check for ID, Navigate if present
If( vGcrID <> 0,
   Set(varGCRID, LookUp('parentdatasource', ID = vGcrID));
   Navigate(MyApprovals, CoverRight)
);

 

I think PowerApps wants you to set the Param as a Variable first before using it, at least that's what has worked for me.

 

From memory, I had to use Value() to sort a similar issue to yours. I now also wrap any text Param's in the Text() function, just to be sure.

View solution in original post

spow
Frequent Visitor

IT WORKED!!!! This has ended hours of frustration, I really appreciate you taking the time to respond to me, thank you so much! 😊

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,369)