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
thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors
Users Online
Currently online: 322 members 6,742 guests
Please welcome our newest community members: