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.
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
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.
The latest release has now fixed this issue. Thanks
Check out new user group experience and if you are a leader please create your group
Did you miss the call?? Check out the Power Apps Community Call here!
See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.
User | Count |
---|---|
272 | |
257 | |
87 | |
39 | |
34 |
User | Count |
---|---|
348 | |
256 | |
130 | |
68 | |
48 |