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

Open PowerApps from a URL - then go to edit screen and filter by a given record

Hello,
We would like to create a URL which will:
(1) Open Power Apps
(2) Go to the Edit Screen (we currently have 3 screens, Browse, Detail and Edit)
(3) Filter by a given record - i.e. MyFieldName=24

i.e.
https://web.powerapps.com/apps/<MyAppID>?MyFieldName=24

But, cannot get this to work. Tried looking at this example but it did not work.
https://powerapps.microsoft.com/en-us/blog/powerapps-deep-linking/

Appreciate any assistance you can provide,
Dan

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Open PowerApps from a URL - then go to edit screen and filter by a given record

Hi @lesotho_kid ,

Your deep link code looks right

https://web.powerapps.com/apps/<MyAppID>?MyFieldName=24

At App OnStart, do this

If(
   !IsBlank(Param("MyFieldName")),
   Set(
      vID,
      Value(Param("MyFieldName"))
   );
   Navigate(YourEditScreen)
)

On the Item of your Edit Form

Lookup(
   YourListName,
   ID=vID
)

If you also navigate to this record by selecting it in a gallery, put this on the Gallery OnSelect

Set(vID,ThisItem.ID);
Navigate(YourScreenName)

 

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.

 

View solution in original post

9 REPLIES 9
Highlighted
Super User III
Super User III

Re: Open PowerApps from a URL - then go to edit screen and filter by a given record

Hi @lesotho_kid ,

Your deep link code looks right

https://web.powerapps.com/apps/<MyAppID>?MyFieldName=24

At App OnStart, do this

If(
   !IsBlank(Param("MyFieldName")),
   Set(
      vID,
      Value(Param("MyFieldName"))
   );
   Navigate(YourEditScreen)
)

On the Item of your Edit Form

Lookup(
   YourListName,
   ID=vID
)

If you also navigate to this record by selecting it in a gallery, put this on the Gallery OnSelect

Set(vID,ThisItem.ID);
Navigate(YourScreenName)

 

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.

 

View solution in original post

Highlighted
Community Support
Community Support

Re: Open PowerApps from a URL - then go to edit screen and filter by a given record

Hi @lesotho_kid ,

Could you please share a bit more about your scenario?

Do you want to edit a specific record in your canvas app via clicking the embedded App URL Link?

 

The user @Kumar9024021 has faced similar needs with you, please check my response within the following thread:

https://powerusers.microsoft.com/t5/Building-Power-Apps/Include-EditForm-link-for-particular-item-in...

 

https://powerusers.microsoft.com/t5/Building-Power-Apps/Embedded-link-to-a-Sharepoint-List-item-in-P...

 

Please take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Super User III
Super User III

Re: Open PowerApps from a URL - then go to edit screen and filter by a given record

Thanks @v-xida-msft for the additional links.

@lesotho_kid if you try the code I supplied, I believe it will work for you - please let me know.

Happy to help further.

Highlighted
Helper I
Helper I

Re: Open PowerApps from a URL - then go to edit screen and filter by a given record

Thanks @WarrenBelz  and @v-xida-msft 

Solved it!

 

Have a good night,

Dan

Highlighted
Helper I
Helper I

Re: Open PowerApps from a URL - then go to edit screen and filter by a given record

Hi @WarrenBelz and @v-xida-msft 

 

One update on this - working properly for the filter but we also have an "add new record" option.  Not sure how to adjust the Item of edit form.  Trying to do something like If FormMode.New - do something - but not sure how to tell it to go into new form mode (and use all defaults) as opposed to using the parameter as filter and edit the form.

 

Thanks!

Dan

 

 

On the Item of your Edit Form

Lookup(
   YourListName,
   ID=vID
)

 

Highlighted
Super User III
Super User III

Re: Open PowerApps from a URL - then go to edit screen and filter by a given record

@lesotho_kid ,

Are you asking to put another parameter into the URL for a new form?

You would do something list this

https://web.powerapps.com/apps/<MyAppID>?MyFieldName=24&NewForm=1

then at App OnStart - you can do this without nesting, but try the below.

If(
   !IsBlank(Param("NewForm")),
   NewForm(YourNewFormName);
   Navigate(YourNewScreenName),
   If(
      !IsBlank(Param("MyFieldName")),
      Set(
         vID,
         Value(Param("MyFieldName"))
      );
      Navigate(YourEditScreen)
   )
)

 

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.

Highlighted
Helper I
Helper I

Re: Open PowerApps from a URL - then go to edit screen and filter by a given record

Thanks @WarrenBelz 

I would prefer to not use another parameter if I don't have to. 

I have only one data entry form called 'MyEditForm'.

When I access via URL or from my browse screen I'd like to pass in the ID and edit an existing record.  That works.

But, on my browse screen I also have an 'Add New' button which, when I click it, I'd like to open the same 'MyEditForm' - this time to create a new record. 

The add button code is:

 
NewForm(MyEditForm);Navigate(MyEditForm, ScreenTransition.None)

 

So, use one form to either edit an existing record or add a new record.  Hope this is possible and I don't have to create an edit screen and an add new screen.  The screen has many fields.

Thanks for all of your help - sincerely appreciated.

Dan

Highlighted
Super User III
Super User III

Re: Open PowerApps from a URL - then go to edit screen and filter by a given record

Hi @lesotho_kid ,

Yes that is certainly possible - mine was only an example of the syntax required with a different screen.

Highlighted
Helper I
Helper I

Re: Open PowerApps from a URL - then go to edit screen and filter by a given record

Thanks again @WarrenBelz - that worked.  Sorry about all of the questions.  Sincerely appreciate your help.

 

Have a good weekend,
Dan

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Top Solution Authors
Top Kudoed Authors
Users online (5,954)