cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

Question regarding SharePoint lists with Canvas apps

So, I've built PowerApps SharePoint List forms in the past and have a question regarding Canvas app.  I've got the SharePoint list added as a datasource in the Canvas app.  When I click on the item in the list, I want it to load the Canvas app with the data for that particular line item.  I know the general process on how to achieve this (I can pass the App ID, Tenant ID, and list item ID into PowerApps), but where I'm getting lost is in some of the detail.  Here is what I'm currently doing:

 

1.  I pass the SharePoint list item ID to PowerApps.

2.  On each form, in the ITEM property, I can use the Lookup command to pull the data item with the corresponding list ID.  So basically, when the form loads, it will display the data from the specific list item.

 

Here is what I'd rather do and can't quite get my head around it.  With the PowerApps SharePoint list forms, it is easy to do so I need some help:

 

1. On form load, I'd like to query the list for the list item and load all the data.  I'm assuming I can probably use my lookup code for that.

2. I'm confused as to what I'd put in the ITEM field on the forms.  Any thoughts?

 

 

 

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Question regarding SharePoint lists with Canvas apps

Hi @blanghorst ,

Do you want to know how to set the Items property of Form?

If you have get the Item's ID, as you said, you can use LookUp function to pull that data record.

Please put following formula to Items property:

LookUp('SP list',ID= <Item's ID>)

Best regards,

Sik

If this post helps, then please click on “Accept as Solution” to help the other members find it more quickly.

Highlighted
Advocate II
Advocate II

Re: Question regarding SharePoint lists with Canvas apps

 I'm already doing exactly what you posted and it works.   What I'm asking is if there was another way of accomplishing the same thing so I wouldn't have to perform the lookup on every screen.  Like, for example, doing the Lookup in the OnStart event.  If I do that, what would I populate the ITEM property on the forms list with since I've already performed the lookup in OnStart?

Highlighted
Community Support
Community Support

Re: Question regarding SharePoint lists with Canvas apps

Hi @blanghorst ,

 

Sorry for the delay reply.

If you want to preform the lookup function at OnStart of App, you use variable to store the lookup record, and set variable to Itmes of Form. Please refer to my test.

1. Set the following formulas to OnStart property of App.

 

Set(Var,LookUp(Accounts,'Account Name'="A. Datum Corporation (sample)"))

2. Set "Var"  to Items property of Form.

Annotation 2019-10-28 114031.png

Hope this can help.

Best regards,

Sik

If this post helps, then please click on “Accept as Solution”  to help the other members find it more quickly.

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

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

Top Solution Authors
Top Kudoed Authors
Users online (7,010)