cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
shugs
Advocate I
Advocate I

auto generate app with multiple SharePoint lists

Hi,

I would like to create an app similar to the ones that are auto generated by PowerApps, but based on several Sharepoint lists :

I would need to create a first Screen allowing to choose which Sharepoint list to acces and the next screens would be identical to the ones generated by PowerApps. How can I integrate several auto generated apps into one?

1 ACCEPTED SOLUTION

Accepted Solutions
mr-dang
Community Champion
Community Champion

@v-micsh-msft is right--you will need to connect your datasources to a control. 

 

Below is a method in which I use a Dropdown menu to determine which list is needed, a Button that triggers the Navigation, then screens duplicated for each form.

 

First autogenerate an app from any SharePoint List. We are going to use these for duplicating later.

 

Next, create a new screen where you will have the user navigate to their desired list.

Use Table() in the Items property of a Dropdown menu:dropdown navigate.png

Table(
	{id: 1, screen: Screen2, name: "List 1"},
	{id: 2, screen: Screen3, name: "List 2"}
)

Each row of the formula lists the name of the SharePoint list and the Screen I want it associated with. The advantage of the Table function is that it can reference Screens where few other functions can. I also gave each list an id number which I can reference in conditional statements later. 

 

Next setup a Button that determines where to go:

 

 

dropdown navigate button.png

 

 

Navigate(Dropdown1.Selected.screen,Fade)

 

The formula means, "Navigate to the screen that is listed for the record that has been selected in the Dropdown menu."

 

The next step is messy. There's a few methods you can go with depending on what is easier for you or if you want to be more efficient.

  • Method 1: copy the screens for BrowseScreen, DisplayScreen, and EditScreen for each SharePoint list. Reconfigure each gallery and form to match the correct list. Revise the Table() function in your Dropdown menu as necessary. I think this one is easier to understand, but you will end up a number of screens equal to 3 x [number of SharePoint lists].
  • Method 2: keep your app to only 4 screens: BrowseScreen, DisplayScreen, EditScreen, and the one with the Dropdown (SetupScreen). Instead of duplicating screens, duplicate the gallery on each screen instead. Program the Items of each gallery to the SharePoint list of your choice, then make it Visible only when the id number selected in the Dropdown (Dropdown.Selected.id) matches the number you associated with it. This method should be more efficient.
Microsoft Employee
@8bitclassroom

View solution in original post

11 REPLIES 11
v-micsh-msft
Community Support
Community Support

Hi @shugs,

 

 

At the begining I thought we could take use of collection to "store" Data source (should be connections), then use the dropdown to choose the proper one, but it seems that collection won't be created if data source is configured as an item in a record.

 

Another way is the following:

Say, we have special TextInput under the first screen,which is used to filter which data source that we should work with.

Then Add a Button, with its OnSelect property configured with the If function, and the corresponding Naviagte formula to the proper Gallery screen.

This would require all the data sources connected with the proper Navigate Screen, and the corresponding Details and editing screen bound to it.

 

@mr-dang@Meneghino@hpkeong, do you have any better ideas on this?

 

Regards,

Michael

 

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
mr-dang
Community Champion
Community Champion

@v-micsh-msft is right--you will need to connect your datasources to a control. 

 

Below is a method in which I use a Dropdown menu to determine which list is needed, a Button that triggers the Navigation, then screens duplicated for each form.

 

First autogenerate an app from any SharePoint List. We are going to use these for duplicating later.

 

Next, create a new screen where you will have the user navigate to their desired list.

Use Table() in the Items property of a Dropdown menu:dropdown navigate.png

Table(
	{id: 1, screen: Screen2, name: "List 1"},
	{id: 2, screen: Screen3, name: "List 2"}
)

Each row of the formula lists the name of the SharePoint list and the Screen I want it associated with. The advantage of the Table function is that it can reference Screens where few other functions can. I also gave each list an id number which I can reference in conditional statements later. 

 

Next setup a Button that determines where to go:

 

 

dropdown navigate button.png

 

 

Navigate(Dropdown1.Selected.screen,Fade)

 

The formula means, "Navigate to the screen that is listed for the record that has been selected in the Dropdown menu."

 

The next step is messy. There's a few methods you can go with depending on what is easier for you or if you want to be more efficient.

  • Method 1: copy the screens for BrowseScreen, DisplayScreen, and EditScreen for each SharePoint list. Reconfigure each gallery and form to match the correct list. Revise the Table() function in your Dropdown menu as necessary. I think this one is easier to understand, but you will end up a number of screens equal to 3 x [number of SharePoint lists].
  • Method 2: keep your app to only 4 screens: BrowseScreen, DisplayScreen, EditScreen, and the one with the Dropdown (SetupScreen). Instead of duplicating screens, duplicate the gallery on each screen instead. Program the Items of each gallery to the SharePoint list of your choice, then make it Visible only when the id number selected in the Dropdown (Dropdown.Selected.id) matches the number you associated with it. This method should be more efficient.
Microsoft Employee
@8bitclassroom

View solution in original post

hi @v-micsh-msft @mr-dang

 

In fact, you and brian has given a very clear explanation with bundle of examples and that should provide an in-depth understanding.

Appreciate.

 

Hong

hpkeong

So I created an App outside of the sharepoint list.   I connected it but it won't replace the default form.   How do I get this form I created to integrate with sharepoint?  I too will be using this form to update multiple sharepoint lists.   The features of the form work well.  I just don't know how to integrate with sharepoint. 

 

Does the form have to be autogenerated from at least one of the sharepoint lists?  I will eventually have 5 lists that will be updated using this same form. 

 

thank you

The next step is messy. There's a few methods you can go with depending on what is easier for you or if you want to be more efficient.

Method 1: copy the screens for BrowseScreen, DisplayScreen, and EditScreen for each SharePoint list. Reconfigure each gallery and form to match the correct list. Revise the Table() function in your Dropdown menu as necessary. I think this one is easier to understand, but you will end up a number of screens equal to 3 x [number of SharePoint lists].
Method 2: keep your app to only 4 screens: BrowseScreen, DisplayScreen, EditScreen, and the one with the Dropdown (SetupScreen). Instead of duplicating screens, duplicate the gallery on each screen instead. Program the Items of each gallery to the SharePoint list of your choice, then make it Visible only when the id number selected in the Dropdown (Dropdown.Selected.id) matches the number you associated with it. This method should be more efficient.

It's that messy part that needs help in my opinion.  We should be able to auto-generate a 'common screen set' (browse-view-edit) with navigation and submit from an entity at any time. 

@joshbookerand others, can I hijack this topic for something similar, just in order not to open the fresh one? I am trying to develop an app that uses SharePoint lists scattered over 14 subsites, all of them using same content type (so the structure is identical). Basically, every site is a city with which filed technicians should communicate.

 

This idea with separate screens could work for me, so I can have a city choice on the first one as it is explained above, develop the forms for one city, just duplicate the subscreens and connect every one of them to the list on appropriate subsite. However, this will turn into nightmare if client wants some changes, meaning I have to make them over 14 sites. From what I can see, there is no way I can parametrize the choice of datasource when inserting combobox, for example – when choosing items, only the column-reference of previously chosen datasource is available.

 

Any idea is appreciated…

Anonymous
Not applicable

Hi,
I used method 1.
Created screens , replaced all data sources, gallery and form references.

But the gallery for the copied lists redirects to the original list's view form screen.

Any idea what's going wrong?
Raniyath
Frequent Visitor

could you please explain how to link 3 sharepoint list to 3 gallery with screenshots ? as well as how to program it  ?

Anonymous
Not applicable

1) Create an app with one SharePoint list, powerapps does this for you and gives you 3 screens of which one is the gallery.
2) Go to data sources from the top toolbar within powerapps and add the other 2 lists.
3) Duplicate the gallery screen
4) click on the duplicate gallery and change the list reference in the formula bar to the 2nd list.
5) repeat step 2-5 for the third list

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Power Apps Community Call Jan. 2022 768x460.png

Power Apps Community Call

Please join us on Wednesday, January 19th, at 8a PDT. Come and learn from our amazing speakers!

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 (2,985)