cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Nene
New Member

PowerGallery with two Sources (O365 User and SP List)

Hello all,

I would like to store two different data sources in a PowerGallery, which are then selected based on a DropDown value. So far I have always done this with a switch, which also worked well.

But now one data source is Office365Users, the other one is a SharePoint list.
The SharePoint list has identical columns including upper and lower case to the fields used in the Users.

My switch command looks like this:
Switch(
Dropdown1.Selected.Value,
"Internal",Office365Users.SearchUser(),
"External",GA_External,
Office365Users.SearchUser()
)

 

The individual rows are each filled in with, for example, "ThisItem.DisplayName" or "ThisItem.CompanyName".

Result: If I add only the rows with O365Users, everything is fine. As soon as I add external, my PowerGallery is displayed with empty rows.

Can someone help me? 🙂

 

BR 

Nene

1 ACCEPTED SOLUTION

Accepted Solutions
FernandoTC
Resolver III
Resolver III

Hi @Nene.

 

I have made some tests with an app to check what could be going wrong. the first thing I thought was that you wont be able to use two different connectors in the same gallery but this wasnt the case for me.

 

What I found is that I can use 2 different sources of different connectors but:

  • If a column name is shared between both data sources, it has to have the same data type.
  • Both data sources do not need to have the same number of columns but you have to specify which columns you want to retrieve via ShowColumns() function. You will be able to reference only columns that are shared between the two data sources.

I tried this on the items property of my gallery (the second source is SQL server table)

FernandoTC_0-1669648674088.png

And I can swap between the two data sources using a toggle and display the column DisplayName in the gallery.

 

Weird, I know, but try using ShowColumns in all data sources and retrieve the same columns for all of them.

 

Let me know if this helped you.

View solution in original post

2 REPLIES 2
FernandoTC
Resolver III
Resolver III

Hi @Nene.

 

I have made some tests with an app to check what could be going wrong. the first thing I thought was that you wont be able to use two different connectors in the same gallery but this wasnt the case for me.

 

What I found is that I can use 2 different sources of different connectors but:

  • If a column name is shared between both data sources, it has to have the same data type.
  • Both data sources do not need to have the same number of columns but you have to specify which columns you want to retrieve via ShowColumns() function. You will be able to reference only columns that are shared between the two data sources.

I tried this on the items property of my gallery (the second source is SQL server table)

FernandoTC_0-1669648674088.png

And I can swap between the two data sources using a toggle and display the column DisplayName in the gallery.

 

Weird, I know, but try using ShowColumns in all data sources and retrieve the same columns for all of them.

 

Let me know if this helped you.

Perfect! That was the little piece of the puzzle that I was still missing. Thank you

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

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