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

Deeplinking to powerapps form

I have a form that users fill out, that then goes through approval, however I would like to include a link for it in the approval email that opens the form up with the filled out information

 

I made the link and it seems to work, however the form opens up  empty, and i am not sure how I can correct it.

 

VxChemical_0-1638955519309.png

 

I am not sure if the error comes from the https which it doesn't like, even though it can see its a link.

 

Using this OnStart for the app (i turned on the retired setting)

 

 

 

Set(ItemID, Param("ID"));
If(
   !IsBlank(ItemID),
   Navigate(Screen1, ScreenTransition.None)
)

 

 

 

and this as the item property on my form

 

 

 

If(
   !IsBlank(ItemID),
   LookUp(https://sharepoint.com/sites/Copenhagen/ISC/Lists/Form%20test/,ID = Value(ItemID)),
   Form1.Selected
)

 

 

 

I am fairly new at PowerApps pointers would be nice.

 

 

Thank you

2 ACCEPTED SOLUTIONS

Accepted Solutions
VxChemical
Helper I
Helper I

I think I may have solved it. It is FormMode.New and not FormMode.Edit.

Should i do a seperate screen for the new form mode, or just change it onload?

 

I am currently using this. Though it just says loading data forever.

    If(
   !IsBlank(Param("ItemID")),
   Set(
      varRecordTicket,
      LookUp('User Account Form',
      ID=Value(Param("ItemID")
   );
   Navigate(EditScreen)
)

In my item for my Form on my edit screen, is underlined, not understanding it.

 

What is best practice? changing the form mode or having a second edit screen, I definetly prefer changing the form mode.

 

Thanks

View solution in original post

@VxChemical ,

You just need to do this

If(
   !IsBlank(Param("ItemID")),
   Set(
      varRecordTicket,
      LookUp(
         'User Account Form',
         ID=Value(Param("ItemID")
      );
   );
   EditForm(YourFormName);   
   Navigate(EditScreen)
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

View solution in original post

11 REPLIES 11
WarrenBelz
Super User
Super User

Hi @VxChemical ,

Is that a SharePoint Integrated Form? If so, it does not support Deep Linking - this can only be done on Canvas Apps.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

VxChemical
Helper I
Helper I

I made it as an Canvas app and then linked the form after. 

 

Atleast that's how i remember it, is there a way to easily check?

WarrenBelz
Super User
Super User

@VxChemical ,

I actually see the problem now

If(
   !IsBlank(ItemID),
   LookUp(https://sharepoint.com/sites/Copenhagen/ISC/Lists/Form%20test/,ID = Value(ItemID)),
   Form1.Selected
)

That URL lookup will not work - you need to link the list

LukasKo
Advocate I
Advocate I

Hi @VxChemical , 

 

 it's exactly how @WarrenBelz said. You need to use data source connector in LookUp function, something like

 

If(
   !IsBlank(ItemID),
   LookUp('Form test',ID = Value(ItemID)),
   Form1.Selected
)

 In case of using url (in some other cases), you have to enclose the string in quotation marks, e. g. 

 

Launch("https://sharepoint.com/sites/Copenhagen/ISC/Lists/Form%20test/");

 

And yes, it's easy to check your deep link, just take url of your published app and add your parameter with value as query string at the end 

 

&ItemID=5, 

 

something like

 

https://apps.powerapps.com/play/6bf16cca-e95f-4fc9-add6-a0e3a8a9a108?tenantId=f9eb7c2a-37a3-4a1e-aa8...

 

One more note, Navigate in App.OnStart is newly deprecated and .StartScreen property should be used instead

 

If(!IsBlank(Param("ID")), Screen1)

 

Hope it helps

 

 

I have looked more at it and I have changed it avoid a bit to not use the deprecated function

 

So I successfully send the link and get the item id.

 This is my submit button

 

SubmitForm(Form1);

Office365Outlook.SendEmailV2("mail@mail.com","Testing HTML Link","To upload your document open the app: <a href='https://powerapps.us/play/e9c2d077-4fa2-4988-9123-491a156a4594?tenantId=66cf5074-5afe-48d1-a691-a12b2121f44b&ItemID=" & Form1.LastSubmit.ID &"'>Link to App</a>");Navigate(Screen2)

this sends the link with the ItemID being equal to the record it just saved which is nice.

 

It however is empty when i click it.

 

I am not sure what to put in my app onstart

 

This is what im using

 

Set(varFormID, Value(Param("ItemID")));
If(varFormID <> 0, Set(varRecord,LookUp('User Account Form', ID=varFormID));Navigate(Screen1))

 

I have a test field that collects varFormID and it shows it off correctly, not sure how to get it to load the data into my form.

 

Thanks  so much for any help

@VxChemical ,

That will load the record with the ID matching the incoming Parameter ItemID in the form - what is it not doing?

VxChemical
Helper I
Helper I

The record is empty, there is nothing.

VxChemical
Helper I
Helper I

I think I may have solved it. It is FormMode.New and not FormMode.Edit.

Should i do a seperate screen for the new form mode, or just change it onload?

 

I am currently using this. Though it just says loading data forever.

    If(
   !IsBlank(Param("ItemID")),
   Set(
      varRecordTicket,
      LookUp('User Account Form',
      ID=Value(Param("ItemID")
   );
   Navigate(EditScreen)
)

In my item for my Form on my edit screen, is underlined, not understanding it.

 

What is best practice? changing the form mode or having a second edit screen, I definetly prefer changing the form mode.

 

Thanks

@VxChemical ,

You just need to do this

If(
   !IsBlank(Param("ItemID")),
   Set(
      varRecordTicket,
      LookUp(
         'User Account Form',
         ID=Value(Param("ItemID")
      );
   );
   EditForm(YourFormName);   
   Navigate(EditScreen)
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,247)