cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cyoung5555
Level: Powered On

Latest Update Creating Error in Gallery that uses multiple data sources

I was not sure where to post this. The latest update 3.18054.15 will not process my gallery items properly. I have three databases from sharepoint with identical layout. I have more than 5,000 records so they are in 3. I use a series of dropdown menus to tell the gallery which datasource to use and which records to pull. This works fine in the previous releases, but now I am getting an error message saying that the gallery can only access one data source. Please fix this.

3 REPLIES 3
Community Support Team
Community Support Team

Re: Latest Update Creating Error in Gallery that uses multiple data sources

Hi @cyoung5555,

 

Please share more detailed configuration of your app. Like the related formulas and how many galleries do you have and how each one is configured.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
cyoung5555
Level: Powered On

Re: Latest Update Creating Error in Gallery that uses multiple data sources

The error message I get is that all possible results of the If function must reference the same data source.

There are three sharepoint lists that I have added NALOFData1, NALOSData1, CALAData1

 

I have a bunch of dropdowns and combo boxes that drive the gallery formula.

 

Here is the gallery formula.

 

If(And(DB_Data.Selected.Value="NALO FS", DB_Search.Selected.Value="Owner"), SortByColumns(Filter(NALOFData1,StartsWith(Owner,TxtHotelDB.Text)),"BrandLocator1", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)),
If(And(DB_Data.Selected.Value="NALO FS", DB_Search.Selected.Value="MgmtCo"), SortByColumns(Filter(NALOFData1,StartsWith(MgmtCo,TxtHotelDB.Text)),"BrandLocator1", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)),
If(And(DB_Data.Selected.Value="NALO FS", DB_Search.Selected.Value="Brand Location"), SortByColumns(Filter(NALOFData1,StartsWith(BrandLocator1,TxtmyBrandLocation.Text)), "BrandLocator1", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)),
If(And(DB_Data.Selected.Value="NALO FS", DB_Search.Selected.Value="Country"), SortByColumns(Filter(NALOFData1,StartsWith(Country,DB_Country.Selected.Value)), "StateRev", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)),
If(And(DB_Data.Selected.Value="NALO FS", DB_Search.Selected.Value="State City"), SortByColumns(Filter(NALOFData1,StartsWith(StateCity,TxtmyStateCity.Text)), "BrandLocator1", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)),
If(And(DB_Data.Selected.Value="NALO MSB",DB_Search.Selected.Value="Owner"), SortByColumns(Filter(NALOSData1,StartsWith(Owner, TxtHotelDB.Text)), "BrandLocator1", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)),
If(And(DB_Data.Selected.Value="NALO MSB", DB_Search.Selected.Value="MgmtCo"), SortByColumns(Filter(NALOSData1,StartsWith(MgmtCo,TxtHotelDB.Text)),"BrandLocator1", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)),
If(And(DB_Data.Selected.Value="NALO MSB",DB_Search.Selected.Value="Brand Location"), SortByColumns(Filter(NALOSData1,StartsWith(BrandLocator1,TxtmyBrandLocation.Text)),"BrandLocator1", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)),
If(And(DB_Data.Selected.Value="NALO MSB", DB_Search.Selected.Value="Country"), SortByColumns(Filter(NALOSData1,StartsWith(Country,DB_Country.Selected.Value)), "StateRev", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)),
If(And(DB_Data.Selected.Value="NALO MSB", DB_Search.Selected.Value="State City"), SortByColumns(Filter(NALOSData1,StartsWith(StateCity,TxtmyStateCity.Text)), "BrandLocator1", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)),
If(And(DB_Data.Selected.Value="CALA", DB_Search.Selected.Value="Owner"), SortByColumns(Filter(CALAData1,StartsWith(Owner,TxtHotelDB.Text)),"BrandLocator1", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)),
If(And(DB_Data.Selected.Value="CALA", DB_Search.Selected.Value="MgmtCo"), SortByColumns(Filter(CALAData1,StartsWith(MgmtCo,TxtHotelDB.Text)),"BrandLocator1", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)),
If(And(DB_Data.Selected.Value="CALA", DB_Search.Selected.Value="Brand Location"), SortByColumns(Filter(CALAData1,StartsWith(BrandLocator1,TxtmyBrandLocation.Text)), "BrandLocator1", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)),
If(And(DB_Data.Selected.Value="CALA", DB_Search.Selected.Value="State City"), SortByColumns(Filter(CALAData1,StartsWith(StateCity,TxtmyStateCity.Text)), "BrandLocator1", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)),
If(And(DB_Data.Selected.Value="CALA", DB_Search.Selected.Value="Country"), SortByColumns(Filter(CALAData1,StartsWith(Country,DB_Country.Selected.Value)), "BrandLocator1", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)), SortByColumns(Filter(CALAData1,StartsWith(Country,DB_Country.Selected.Value)), "BrandLocator1", If(SortDescending1, SortOrder.Descending, SortOrder.Ascending)))))))))))))))))

 

This formula used to work fine.

cyoung5555
Level: Powered On

Re: Latest Update Creating Error in Gallery that uses multiple data sources

The latest release has now fixed this issue. Thanks

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 210 members 4,771 guests
Please welcome our newest community members: