cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cyoung5555
Frequent Visitor

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

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

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

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

The latest release has now fixed this issue. Thanks

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

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