Is there a wildcard character to use for the rest api/table api?

James Rac
Tera Contributor

Hi all,

I'm using the rest api to search on contacts by phone number, but the phone number format can be widely varied. Because of this, sometimes the query fails if it is not an exact match. I found some documentation regarding wildcards for the global search but nothing for the api. I've tried the same characters for the api with no luck, the * or % characters. Is this something that is supported with the api or is it not available?

 

Ideally I'd be able to do something like *1*123*123*1234 to match all forms of different phone number formats such as 1 (123) 123 1234, 1 (123)-123-1234, 1 123-123-1234, +11231231234

I saw some suggestions to make another field and do a format on it and then run my query against this field... I dont think that would work for me. I would preferably like to not create a custom field just to search on this one phone number field, since the alternative means creating custom fields for every phone number field I want to query on...

 

Thanks.

5 REPLIES 5

This sounds like it requires still creating a new value to hold this result of the regex? I did some researching to make sure I wasn't misunderstanding but it doesn't appear the rest api allows regex as an input for variables. It's an interesting idea but doesn't solve the problem as this would require the instance to still have this value saved on all phone number related values.