Hello, I was trying to do multiple search in one button, considering that if the search is not found it return all the records, this would be usefull for do a search with multiple parameters. For example in my case I have 2 parameters for search in the table, lets say:
parameter1, parameter2.
I want to do the next:
Search(Search('Data source'; String1.Text; Parameter1); String2.Text; Parameter2)
In theory I would get all the records that satisfy parameter1 = String1.Text && parameter2 = String2.Text, if doesnt satisfy parameter1 but it does in parameter2 I would get all the records that satisfy parameter2 but in my case I got nothing. It seems I cannot use the result of the first Search as parameter of the second one even though the result is a table with records (that acts the same as a Data source). As an alternative I am doing right now 2^2 = 4 "if" sentences but this isn't scalable at all because if I got 6 parameters I would get 2^6 = 64 "if" sentences, thats why I want to use the search function.
Is this a bug or I just don't understand well the functionality of search?
If you have any doubts about what I am trying to explain I would answer thankfully.
Regards,
Solved! Go to Solution.
PPS The caching will work only for sources with up to 500 rows. If you have more than 500 lines then use this:
https://powerusers.microsoft.com/t5/PowerApps-Forum/500-item-limit-in-CDM-entity-search-filter-need-...
My solution is towards the end of the post
Hey @Meneghino
You nailed it!
Using "ClearCollect(CachedDataSource; 'Data source')" and then use the search with that collection works with multiple Search functions! This solved my problem but I still don't know why it doesn't work with the datasource in the first search.
Thanks for all your help!
It doesn't work because of delegation issues, I imagine. In any case by caching you can really improve the performance of the searches and lookups so that they are lightning quick even with thousands of rows.
All the best
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
User | Count |
---|---|
165 | |
94 | |
69 | |
64 | |
63 |
User | Count |
---|---|
222 | |
160 | |
96 | |
86 | |
80 |