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?
Solved! Go to Solution.
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?
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.
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
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?
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?
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
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.
It is taking me to the record now but it just says getting your data @RandyHayes
What is the Item property of your Form?
User | Count |
---|---|
126 | |
87 | |
85 | |
75 | |
69 |
User | Count |
---|---|
215 | |
180 | |
139 | |
97 | |
83 |