API Query - Is there "like" ? Yes in ContactGroup no everywhere else?

(Jerel lorenzo) #1

SOLVED use the normal wild card % and it works.

So this gets complicated…

Simply I’m looking for a like operator in my request.
So if i queried for Company in Contact as “ins” where there is a record Company named “insurance co” = no result.

However and i’m currently using this actively so it works. So I query a specific value for GroupName from ContactGroup ( which presumably has ALL applied tag names within that field because again that’s how it’s actively working ) it will work.

So I just assumed that queryData equated to a like structure so basically everything was ‘%value%’ again because that’s how ContactGroup queries ultimately behave.

Logically both of these can not function differently.

Where i’m going with this is i’m asking for the first few characters of company name, to then query the Contact Company field. So basically searching for a company before they add the duplicate…


(Pav) #2

What about using the query like this: "Examp%"
It will match the first 5 letters, but anything else afterwards.

Can you not do a search on the Company Name directly? Or are there variations on the names?

(John Borelli) #3

So am I to understand that you are not creating actual company records but just giving the contact company field a name? I would create a company record like you do a contact and then assign it to the contact it belongs to on the company id field. That way checking for dups is much simpler. I’ve used this approach many times.

(Jerel lorenzo) #4

Where’s the hammer?

You’re holding it…


aka - ya that did it. Guess that couldn’t have been more obvious… Thanks

(Jerel lorenzo) #5

nope searching a wildcard all you need is the % just like mysql…