Skip to main content

Hey all,

An employee would like to search for the phone number of a customer in Account Contacts to find him/her faster, however, currently there is no formatting standard employed for phone numbers. By this, I mean that a phone number can look like any of the following examples:

+46 123 4567

012-345 67

012-34567

0 1234567 etc…

This means that if I wanna find all instances of this phone number, I would only get the phone numbers that are uninterrupted (which might not even exist).

 

Before this employee was able to search for any phone number using the following sql search:

replace(replace(replace(replace(replace(PHONE,'(0)',''),' ',''),')',''),'(',''),'-','') like '%760400560' or

replace(replace(replace(replace(replace(MOBILE,'(0)',''),' ',''),')',''),'(',''),'-','') like '%760400560'

The issue currently is that the Advanced search in IFS Cloud does not recognize “replace”:

 

CrmCustomerContact/CustomerContactOverviewPage (server error)
Malformed Request.
Error details: d{"code":"EXPRESSION_PROPERTY_NOT_IN_TYPE","message":"The property 'replace', used in a query expression, is not defined in type 'IfsApp.CrmCustomerContactHandling.CustomerContactCrm'."}]

 

 Any tips on how to solve this from within the search bar?

 

Thank you in advance.

It is a pity that this is not included in advanced search. To be honest, the advanced is more like, don't-go-here-search, as the syntax is not released in the documentation and it is not helpfull at all for users. Sometimes I wonder for whom is this build?

Would something like ~2_3_4 help? It should locate all phone numbers that have 234 (with or without space between them).


Would something like ~2_3_4 help? It should locate all phone numbers that have 234 (with or without space between them).

 

What seems to work fine is using Contact Search instead (I’m not sure if that’s included by default or it’s our own solution), where one can type in the phone number separated by %’s, like %1%2%3%4%6%7… 

I’ll still mark your answer as best answer since it’s still on the right track 🙂 Thank you!


But will %1%3%… not include 123 and 113 and 143 but also 187873?

So too much phone numbers? _ will only work as one position/character wildcard. Still giving 103, 113, 123, 133 etc.

Anyway, it is weird that advanced search is not in yet. I would like to know why IFS stepped away from SQL where clauses.


It will, but we see the full number, so it’s very low chance that someone else has the exact same numbers + some random number at some place…

Although it would definitely be better if one could do a quick regexp match :)


Reply