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

SharePoint - custom PowerApps form - automatically pull data from lookup fields to the form

Hi all,

 

is there a way how to pull data automatically to the custom PowerApps form SharePoint lookup fields?

I have a field Cost Description, which is a lookup field, and that's also pulling another fields from that list:
Budget Code
Cost Type
Local Code

xsomej_0-1613488343251.png

I have those fields in the form, but I want the user to select only the Cost Description and update the other fields automatically:

xsomej_1-1613488430738.png

Those fields are populated after the user submits the form to the SP list.
But is there any way how to update them automatically in the form?

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@xsomej 

Yes, I understand.  The problem is that the Default form will bring that combobox in with a Choices formula on the Items property.  This will NOT supply the additional information that you want.

So, as I mentioned in last reply...that is how you work around it.

Otherwise, you will need to do a lookup on all of the other places that you want data:

i.e   LookUp('Cost description', ID=yourCombobox.Selected.Id, 'Cost Type') and etc for the others.  That can get tedious, but would work as well.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

3 REPLIES 3
RandyHayes
Super User III
Super User III

@xsomej 

Make sure you have the 'Cost description' list in your datasources in the app.

Set the Items property of the combobox (assuming your control in the datacard is a combobox) in the Form to : 'Cost description'

Set the DefaultSelectedItems property (if it's a combobox) to: 

    LookUp('Cost description', ID=ThisItem.'Cost Descripition'.Id)

 

For your other datacards, just reference the combobox.  For example if your combobox is called DataCardValue1 then in your label (or whatever you have) in your Cost Type datacard, set the Text to DataCardValue1.Selected.'Cost Type'

Do the same on the others and adjust for their column names.

 

I hope this is helpful for you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
xsomej
Helper I
Helper I

Hi @RandyHayes,
I'm using the predefined SharePointForm fields, so the Cost Description is working just fine (DefaultSelectedItems is set to Parent.Default). And yes, those are comboboxes.

But I'm looking for a way how to pull those other three columns from SP based on what user selects in the Cost Description drop-down. It get updated after he submits the form, but not while having the form in edit mode.

RandyHayes
Super User III
Super User III

@xsomej 

Yes, I understand.  The problem is that the Default form will bring that combobox in with a Choices formula on the Items property.  This will NOT supply the additional information that you want.

So, as I mentioned in last reply...that is how you work around it.

Otherwise, you will need to do a lookup on all of the other places that you want data:

i.e   LookUp('Cost description', ID=yourCombobox.Selected.Id, 'Cost Type') and etc for the others.  That can get tedious, but would work as well.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!

View solution in original post

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,608)