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.
It is working now. Another problem is that the ID is not changing each time. I use ID as a tag. Sometimes it gets stuck and says the same ID for a new form. What could be the reason for this? I just tried to submit two forms and they both had an ID of 114 I tried again and it moved to 115. @RandyHayes
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?
Yes, sometimes it tags the form with the wrong ID. It's not changing to the correct one. The item property is also varRecord. @RandyHayes
I'm not following what you mean by "Changing to the correct one". When you click on the link, it should be starting a new copy of the app and it should be navigating to the screen with the edit form and it should have the record with the ID passed in the TestID parameter. Are you stating that that is not working? Or is this changing record based on something else?
It's not working again. 5 minutes ago I sent a link to my email with the testID=129 i then just went into the form to submit again and the test ID was still 129 even though there is already a record with this number @RandyHayes. When I enter the form is has the information I put on it last time which doesn't make sense because I have it so that the form is reset each time.
I don't understand...are you creating new records or editing existing records?
If you follow a link in you email, don't you want to open the record that was submitted? If you submit it again, it is not a new record at that point, it is the existing record.
It happens when creating new records. The issue is it's giving the exact same link for different records and the testID number is not always changing. @RandyHayes
You must have something else going on then.
What is the process of creating a new item (the formula that puts the form in New Mode)?
This is what I have on the button that enters the form Refresh('OSC CR');ResetForm(Form1);NewForm(Form1);Navigate('CR Form', Fade); . @RandyHayes
Okay, that's fine (except you only really need the NewForm and Navigate in there, Refresh wastes time and ResetForm will happen with NewForm)
So, are you saying then that once you click that button and the NewForm appears on the 'CR Form' screen and then you submit that form, you:
1) do get a new record in your list
2) the email link sent has the incorrect ID in it?
User | Count |
---|---|
124 | |
87 | |
86 | |
75 | |
69 |
User | Count |
---|---|
214 | |
181 | |
140 | |
96 | |
83 |