cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
Highlighted
Community Champion
Community Champion

Re: auto generate app with multiple SharePoint lists

@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
Highlighted
Community Support
Community Support

Re: auto generate app with multiple SharePoint lists

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.
Highlighted
Community Champion
Community Champion

Re: auto generate app with multiple SharePoint lists

@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

Highlighted
Community Champion
Community Champion

Re: auto generate app with multiple SharePoint lists

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
Highlighted
Helper I
Helper I

Re: auto generate app with multiple SharePoint lists

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

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: auto generate app with multiple SharePoint lists

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. 

Highlighted
Frequent Visitor

Re: auto generate app with multiple SharePoint lists

@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…

Highlighted
Frequent Visitor

Re: auto generate app with multiple SharePoint lists

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?
Highlighted
Frequent Visitor

Re: auto generate app with multiple SharePoint lists

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

Highlighted
Frequent Visitor

Re: auto generate app with multiple SharePoint lists

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
Ignite

Microsoft Ignite

This will be a conference that you do not want to miss!

secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,124)