cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
blanghorst
Level: Powered On

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
v-siky-msft
Level 10

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.

blanghorst
Level: Powered On

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?

v-siky-msft
Level 10

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
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 362 members 5,678 guests
Please welcome our newest community members: