cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

How to fetch data from Multiple Sharepoint Lists in a single New Form?

I want to fetch the data from multiple Sharepoint Lists in a single New Form...For Example - a dropdown field must contain the options fetched from one list and another input field must contain the data  fetched from another list....

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft
Microsoft

Hi@black_28,

Based on the issue that you mentioned, do you want to pull data from SharePoint list to Dropdown and other TextInput?

Could you please share more about your scenario, here are some key questions, please provide more details relative to these questions as below.

  • Is there any relationship between these SP lists?
  • Is there a primary key through these SP lists?
  • Is there a situation where you want to populate the TextInput based on the selected in the Dropdown from another SP list?
  • Do you want to write back to your SP list?

First, you should make sure that you have connected several SharePoint lists within PowerApps. I assume that there is a primary key like “ID” among your SP lists. The following is my SP lists.A.pngB.png

Based on a few of the requirements you mentioned, I have a test on my side, please take a try as below.

  • Set the ComboBox Items property as: 

 

Distinct(TestA,EmployeeID)​

 

  • Set the Update property of the data card corresponding to EmployssID as: 

 

ComboBox1.Selected.Result​

 

  • Set the TextInput Default property as: 

 

If(Form1.Mode=FormMode.New,LookUp(TestB,EmployeeId=ComboBox1.Selected.Result,EmName))​

 

Or you can directly set the Items property of every field.

Any screenshots about the issue will be appreciated.

 

Best Regards,

Qi

View solution in original post

3 REPLIES 3
Super User III
Super User III

Hi @black_28 

A form can only save data to a single list.  However, the items property of the controls in the form can come from any list or even be hard coded ["item1","Item2",etc].  The important point is that the Update property of the card must be set to accept data from the control inside of that card and that the type of data being submitted must match the type required for that field.  For example, you can put a dropdown control inside the card and hide the textbox control .  Change the Update property of the card to Dropdown1.Selected.Value.  

Microsoft
Microsoft

Hi@black_28,

Based on the issue that you mentioned, do you want to pull data from SharePoint list to Dropdown and other TextInput?

Could you please share more about your scenario, here are some key questions, please provide more details relative to these questions as below.

  • Is there any relationship between these SP lists?
  • Is there a primary key through these SP lists?
  • Is there a situation where you want to populate the TextInput based on the selected in the Dropdown from another SP list?
  • Do you want to write back to your SP list?

First, you should make sure that you have connected several SharePoint lists within PowerApps. I assume that there is a primary key like “ID” among your SP lists. The following is my SP lists.A.pngB.png

Based on a few of the requirements you mentioned, I have a test on my side, please take a try as below.

  • Set the ComboBox Items property as: 

 

Distinct(TestA,EmployeeID)​

 

  • Set the Update property of the data card corresponding to EmployssID as: 

 

ComboBox1.Selected.Result​

 

  • Set the TextInput Default property as: 

 

If(Form1.Mode=FormMode.New,LookUp(TestB,EmployeeId=ComboBox1.Selected.Result,EmName))​

 

Or you can directly set the Items property of every field.

Any screenshots about the issue will be appreciated.

 

Best Regards,

Qi

View solution in original post

Microsoft
Microsoft

Hi@black_28,

Have you solved your issue?

If it solves your request, Mark it as a Solution to enable other users to find it.

Best Regards,

Qi

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (13,291)