cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JürgenD
Helper II
Helper II

Building a link with an ID

Hello everyone,

i want somebody to take changes on a specified sharepointlist item by using a powerapp. So I send the weblink followed by

"&Id=404" by email.

What I want is, that this links opens the app and selects this specified item of the sharepointlist so someone can work with this item.

 

Question 1: Is that the right way to build the link?

Question 2: What do i have to do in the app to see the right item in a form, datatable or gallery?

 

Thank you in advance for your answers

Jürgen

1 ACCEPTED SOLUTION

Accepted Solutions

@JürgenD 

 

Yes, as @timl  you should use that documentation as a guide.

 

I notice you want to use it as SharePoint List item. So then in the Form Item property you should LookUp the Record by the Param("Id"). Note that both the letters L and the U are capitalized in LookUp

 

Item property of your Form:

 

//pseudocode
LookUp(MySharePointList,ID=Param("Id"))

 

 

To be cleaner, it may be better to make sure it is not blank as well, and then put something else for the Item property in the case that the ID param was not provided, so you might prefer this one instead for Item property of Form

 

//pseudocode
With
(
     {myId:Param("Id")}
    ,If
     (
         !IsBlank(myId)
        ,LookUp(MySharePointList,ID=myId)
        ,Blank()
      )
)

 

In the above, you could replace Blank() at the end there, with whatever you might prefer it to use for the Form Item in the case the Param Id was not provided.

 

However, just using the simple one line 

 

LookUp(MySharePointList,ID=Param("Id")) 

 

for the Form's Item property, may be the simplest and the best, if it fits your scenario.

 

See if it helps @JürgenD 

View solution in original post

6 REPLIES 6

@JürgenD 

 

1. In the link, if you use "&Id=404"

2. Then from Power App Canvas App use this to access it:

Param("Id")

Hi and thank you for your help.

I am still a beginner so i have to ask, where do i have to put the Param("Id")?

Let's say i have a form that shall be submitted.

@JürgenD 

 

Suppose you want one of the fields of the form to automatically pre-populate the Param("Id") into there.

To do this:

You can try to place this formula

 

Param("Id")

 

somewhere like in the Default property of a DataCard.

 

 

1. You may need to select a DataCard on the form, and then go to Advanced tab on the right side and click "Unlock to change properties" to be able to edit the Default property of the DataCard, since by default the properties will be greyed out and not be able to be edited until you do this.

poweractivate_0-1664961600649.png

2. Now select the DataCard itself, and then for Default property, change what it says there (it should say something like ThisItem.FieldName there currently) to Param("Id")

 

See if it helps @JürgenD 

timl
Super User
Super User

@JürgenD 

If it helps, the term for what you want to do is "deep link" or "deep linking". If you do a Google search with these keywords, you can more easily find advice on how to carry out this task, such as the article below in the Power Apps documentation.

https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/how-to/deep-linking

 

@JürgenD 

 

Yes, as @timl  you should use that documentation as a guide.

 

I notice you want to use it as SharePoint List item. So then in the Form Item property you should LookUp the Record by the Param("Id"). Note that both the letters L and the U are capitalized in LookUp

 

Item property of your Form:

 

//pseudocode
LookUp(MySharePointList,ID=Param("Id"))

 

 

To be cleaner, it may be better to make sure it is not blank as well, and then put something else for the Item property in the case that the ID param was not provided, so you might prefer this one instead for Item property of Form

 

//pseudocode
With
(
     {myId:Param("Id")}
    ,If
     (
         !IsBlank(myId)
        ,LookUp(MySharePointList,ID=myId)
        ,Blank()
      )
)

 

In the above, you could replace Blank() at the end there, with whatever you might prefer it to use for the Form Item in the case the Param Id was not provided.

 

However, just using the simple one line 

 

LookUp(MySharePointList,ID=Param("Id")) 

 

for the Form's Item property, may be the simplest and the best, if it fits your scenario.

 

See if it helps @JürgenD 

Hello everyone,

thank you for your hints. I got this problem solved with your help.

Unfortunately the next problem occurs. I will describe it in another post.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (3,447)