Hello @iAm_ManCat and thank you for your solution. Your reply should be the proper solution to the topic, not the one chosen. Boy, have I gone far and long to find a solution on a similar problem with delegation issues.
Do you have any advice on how to deal with the similar problem in CDS?
I am trying to pull off some increased inside a filter function, like:
Filter(Contacts,
Lower(emailaddress1)=Lower(Text([@ModelDrivenFormIntegration].Item.emailaddress1)),
//crosscheck on necessary combinations between mob.phone and telephoneX
Substitute(mobilephone," ","")=Substitute([@ModelDrivenFormIntegration].Item.mobilephone," ","")||
Substitute(mobilephone," ","")="str_prefix" & Substitute([@ModelDrivenFormIntegration].Item.mobilephone," ","")||
"str_prefix" & Substitute(mobilephone," ","")=Substitute([@ModelDrivenFormIntegration].Item.mobilephone," ","")||
Substitute(mobilephone," ","")=Substitute([@ModelDrivenFormIntegration].Item.telephone1," ","")||
Substitute(mobilephone," ","")="str_prefix" & Substitute([@ModelDrivenFormIntegration].Item.telephone1," ","")||
"str_prefix" & Substitute(mobilephone," ","")=Substitute([@ModelDrivenFormIntegration].Item.telephone1," ","")
and so on, the list is filter criteria is long.
What I am trying to achieve is to be able to find possible duplicate contacts by filtering through very unnormalized dataset (trying to remove the spaces and prefixes in phone numbers). And while Filter function can be delegated, Substitute, Lower and other text manipulation functions cannot.
I tried your solution on a small subset of data, but it only semiworks. App starts to be very slow when I try it on around 100k contacts.
Or should I just do several consecutive Filter calls and just put the resulting data in a table? The resulting data is maybe 10-20 items max.