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

Determining SharePoint List Destination

Good evening All!

I am stuck in a tricky situation. 

I have an app that was functioning  just fine until my SharePoint list hit >5000 items.

I am now thinking it may make sense to split the lists by location since there are only 1000 possible items per location.

Is there a way to program logic that will determine which list it will patch to based on a dropdown?

 

EXAMPLE:

Dropdown Choices: TownA, TownB, TownC

I have seperate Sharepoint lists for TownA, TownB, TownC

User selects "TownA"

They can now work with data already saved in the TownA list or patch new data to the TownA list - never crossing paths with the other towns but it all uses the same app and same commands.

 

My mind wants to say a variable should work for the "source" component of commands but its just not working,

Is it possible to patch to different "destinations" without writing a million "if" statements?

 

Thanks for any help, you guys are all life savers!

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yutliu-msft
Community Support
Community Support

Hi @linds787 ,

Do you want to save data to different lists by making a choice in drop down control?

I've made a similar test. I want to save the lists as a collection and you could choose one in a drop down control.

However,  it seems that collection won't be created if data source is configured as an item in a record.

I also tried to set the selection of drop down as a variable and use it as data source name in if statement.

However, the variable can't be recongnized as a list name.

I'm afraid it's not supprted currently in PowerApps.

So, as an alternative way, I suggest you navigate to different screens after selecting the drop down.

Different screens bind with different data sources.(screen2 has the form binding with TownA, screen3 has the form binding with TownB, screen4 has the form binding with TownC)

Set the drop down's items:

Table(
	{id: 1, screen: Screen2, name: "TownA"},
	{id: 2, screen: Screen3, name: "TownB"},
{id: 2, screen: Screen4, name: "TownC"} )

Set the Drop down's OnChange:

Navigate(Dropdown1.Selected.screen,Fade)

Here's a similar issue for your reference:

https://powerusers.microsoft.com/t5/General-Discussion/auto-generate-app-with-multiple-SharePoint-li...

 

 

 

Best regards,

Community Support Team _ Phoebe Liu

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yutliu-msft
Community Support
Community Support

Hi @linds787 ,

Do you want to save data to different lists by making a choice in drop down control?

I've made a similar test. I want to save the lists as a collection and you could choose one in a drop down control.

However,  it seems that collection won't be created if data source is configured as an item in a record.

I also tried to set the selection of drop down as a variable and use it as data source name in if statement.

However, the variable can't be recongnized as a list name.

I'm afraid it's not supprted currently in PowerApps.

So, as an alternative way, I suggest you navigate to different screens after selecting the drop down.

Different screens bind with different data sources.(screen2 has the form binding with TownA, screen3 has the form binding with TownB, screen4 has the form binding with TownC)

Set the drop down's items:

Table(
	{id: 1, screen: Screen2, name: "TownA"},
	{id: 2, screen: Screen3, name: "TownB"},
{id: 2, screen: Screen4, name: "TownC"} )

Set the Drop down's OnChange:

Navigate(Dropdown1.Selected.screen,Fade)

Here's a similar issue for your reference:

https://powerusers.microsoft.com/t5/General-Discussion/auto-generate-app-with-multiple-SharePoint-li...

 

 

 

Best regards,

Community Support Team _ Phoebe Liu

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Top Solution Authors
Top Kudoed Authors
Users online (1,428)