cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
spow
Helper I
Helper I

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
Anonymous
Not applicable

@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
Anonymous
Not applicable

@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

 

 

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.

Anonymous
Not applicable

@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.

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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (2,175)