cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
black_28
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
v-qiaqi-msft
Community Support
Community Support

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

Best Regards,
Qi

View solution in original post

3 REPLIES 3
Drrickryp
Super User II
Super User II

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.  

v-qiaqi-msft
Community Support
Community Support

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

Best Regards,
Qi

View solution in original post

v-qiaqi-msft
Community Support
Community Support

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

Best Regards,
Qi

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

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

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

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.

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