Hi fellow PowerApps ninjas,
I am wondering if I can make a collection from 3 other collections.
Here is the scenario:
I have 3 SP lists: Products, Reports, KPIs. There is a hierarchy among them: all KPIs belong to a specific report and all reports belong to a specific product - there are lookup columns as well in the Reports and KPIs lists pointing to their relevant upper category item.
In my PowerApps application I have a search screen and I'd like to do the search in the 3 lists globally and then give back the results in a gallery, where one label indicates if the found item is a product, a report or a KPI - plus some other attributes.
My code looks as follows:
ClearCollect(searchProductResults,
Search(
AddColumns(
'PRODUCTS',
"Columns list"
),
SearchText.Text,
"Columns list"
)
);
ClearCollect(searchReportResults,
Search(
AddColumns('REPORTS',
"Columns list"),
SearchText.Text,
"Columns list")
);
ClearCollect(searchKPIResults,
Search(
AddColumns('KPIS',
"Columns"),
SearchText.Text,
"Columns list")
);
ClearCollect(searchAllResults,searchProductResults,searchReportResults,searchKPIResults)
If I add just any of the 2 of the above 3 collections into the "searchAllResults" collection, it works fine.
However when trying to add the 3rd collection, it gives an error of "The given types are incompatible".
It's definitely not because interfering column types because otherwise it wouldn't work adding just 2 collections.
I haven't found any info on whether 3 (or more) collections can be added into a merged collection.
Any suggestion you could give me?
Dataverse and SQL are not options at the minute, unfortunately, due to lack of funding at my company.
Thanks in advance for any help here!
Cheers,
Tamás