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

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

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

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

PA Community Call

Power Apps Community Call

Next call is happening on April 21st at 8a PST.

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

Experience what’s next for Power Apps

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

Top Solution Authors
Top Kudoed Authors
Users online (20,771)