cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
powerapps890
Post Prodigy
Post Prodigy

Deep linking not working

I am using a deep link to submit information from my form to my email.  This is the code on my submit button - Office365Outlook.SendEmailV2("myemail", DataCardValue19 &" - "& DataCardValue18&":", "<a href='https://apps.powerapps.com/play/04184d60-38af-480b-91cf-e7369b2b5188?tenantId=5dbf1add-202a-4b8d-815..." & DataCardValue1 & "'> Click to view the CR</a> ");

This is in my onstart- Set(varReqID,Value(Param("TestID"))); If(varReqID <>0, Set(varRecord,LookUp('OSC CR', ID = varReqID));

For some reason the email link is sending me to a gallery with all of them and not that specific record. Even though the link has the unique identifying number at the end. Why could this be?

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@powerapps890 

Depends on how you are setting the form mode.

In fact, we should really have had this in the OnStart:

With({varReqID: Value(Param("TestID"))},
   If(varReqID<>0, 
       Set(varRecord,LookUp('OSC CR', ID = varReqID));
       EditForm(yourEditFormName);
       Navigate(yourScreenToEditRecord)
   )
) 

Just to confirm, your EditForm Item property (based on this scenario) should be varRecord.

 

Can you explain more about what you mean by using ID as a Tag?  ID is a built in column to SharePoint, so there is nothing that you can do with it to set or change it.

 

When you say the ID is not changing each time, are you saying that clicking on a link with the TestID in it, that it is not changing to the right one?  Or is this something else? 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

View solution in original post

21 REPLIES 21
RandyHayes
Super User III
Super User III

@powerapps890 

You don't appear to have the TestID in your formula.

Your formula should be:

Office365Outlook.SendEmailV2("myemail", 
    DataCardValue19 & " - "& DataCardValue18 & ":", 
    "<a href='https://apps.powerapps.com/play/04184d60-38af-480b-91cf-e7369b2b5188?tenantId=5dbf1add-202a-4b8d-815...&TestID=" & DataCardValue1 & "'> Click to view the CR</a> "
);

A couple of add on things:

1) You should have this formula in the OnSuccess property of your form so that you are not sending an email even if the submit fails.

2) you should not be referencing the DataCardValues like that.  If they are Text controls, then they should be used with a .Text   However, the reality is, you should never reference the datacardvalues directly like that on a submitted form.  Use the LastSubmit property of the form instead to get the accurate values.  i.e. yourForm.LastSubmit.columnYouWant  Otherwise you might get incorrect results, and worse your app will not function properly in play mode.

 

I hope this is helpful for you.

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

I do have the test ID:  Office365Outlook.SendEmailV2("myemail", Form1.LastSubmit.ReqID &" - "& Form1.LastSubmit.Title&":", "<a href='https://apps.powerapps.com/play/04184d60-38af-480b-91cf-e7369b2b5188?tenantId=5dbf1add-202a-4b8d-815..." & Form1.LastSubmit.ID & "'> Click to view the CR</a> ")

I put it in onsuccess, still the same issue it takes me to this page instead of the one with that ID. @RandyHayes 

RandyHayes
Super User III
Super User III

@powerapps890 

Okay, so the more important question is this, when you click on the link, does the URL in the browser have the information you are expecting?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

RandyHayes
Super User III
Super User III

@powerapps890 

Okay, that is the first step to the diagnosis - you appear to have the TestID in the URL.

Now, what logic do you have in your app to actually navigate to the record being passed and not to your gallery?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

I guess that's the problem before it took me to the record and now it's just not working. How do I make it bypass the gallery to go straight to the form? @RandyHayes 

RandyHayes
Super User III
Super User III

@powerapps890 

I'm not sure you need so many variables in the OnStart, if so adjust accordingly, but, change your OnStart to the following:

With({varReqID: Value(Param("TestID"))},
   If(varReqID<>0, 
       Set(varRecord,LookUp('OSC CR', ID = varReqID));
       Navigate(yourScreenToEditRecord)
   )
)  

Replace yourScreenToEditRecord with the screen you want to go to if the parameter is passed. 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

It is taking me to the record now but it just says getting your data @RandyHayes 

RandyHayes
Super User III
Super User III

@powerapps890 

What is the Item property of your Form?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (30,909)