Hi Community,
I'm trying to implement a CDS Contacts search feature and I'm fighting with delegation issue. The app should be able to search for contacts (easy), accounts (easy) AND contacts related to found accounts (this is where the issue stands).
Here is the formula I have so far:
If(!IsBlank(Trim(TextSearchBox1.Text));
Concurrent(
ClearCollect(ContactsFound;Filter(Contacts; Trim(TextSearchBox1.Text) in 'Full Name' ));
ClearCollect(AccountsFound;Filter(Accounts; Trim(TextSearchBox1.Text) in 'Account Name').Account)
);;
Collect(ContactsFound;Filter(Contacts; AsType('Company Name';[@Accounts]).Account in AccountsFound))
;Blank())
The last Collect is where delegation warning is reported.
I cannot find a way to avoid PowerApps to download all contacts to evaluate the Filter. Is there a way to do this? It seems there is no way to delegate a search against CDS Lookup field type...
Anyone would have a magical trick for me?