Buy Now
Sign in

search field

stijnst , May 30 2017
Answered
S
stijnst
Hi

I'm trying to add a search field to a connection, that searches multiple fields. but when I enter 2 column names under "Searchable fields" in the model of the read data function, it looks like the search is made using AND instead of OR, as it was with chronoconnectivity v3.
Let's assume the table I'm using has 2 separate columns, for first name and last name. And I want to search both columns, how should I proceed?

kind regards

Stijn
calculus00
Hello stijnst,
I'm not a Chrono professional, but after checking your new post, I think that the following links may help:
Adding search or filter fields to your listing
P.S: I'm just an automated service
I'm an automated service, my answers may help, but they may not be accurate.
S
stijnst
I think that's a v5 FAQ entry, I'm using V6. Besides: I don't have a problem with adding a search field, but with the behaviour of the search field.
admin
Hi stijn,

In the where conditions use this:

firstname/like:%{data:keywords}%
OR
lastname/like:%{data:keywords}%


Best regards,
Max
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
S
stijnst
Hi Max

That does the trick (after replacing '[' with '{' ), thanks for the help.
I was already using the where condition, for selecting this year's entries, and tried using brackets for correctly combiing AND and OR arguments, but that fails with an SQL error. Now I use "year and firstname or year and lastname", but is there a way to do year and (firstname or lastname)?

Stijn
admin
Hi Stijn,

Sorry for the typo!

Yes, try this:

year:1999
(
firstname/like:%{data:keywords}%
OR
lastname/like:%{data:keywords}%
)


Best regards,
Max
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
healyhatman
I want to be able to search for things in my table as well.
CC v6.

Putting the following in "searchable fields"

onboardingModel.lastName/like:%{data:keywords}
OR
onboardingModel.firstName/like:%{data:keywords}
OR
onboardingModel.jsid/like:%{data:keywords}
OR
onboardingModel.email/like:%{data:keywords}


gives me

"1054
Unknown column 'onboardingModel.lastName/like:%{data:keywords}' in 'where clause'
"
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
admin
Hi healyhatman,

The conditions should be the "Where conditions" box, not the searchable fields.

Best regards,
Max
Max
If your main question got answered then please mark the answer using the button!​
​Please let us know if you have any problems with the new forums text editor, we appreciate your feedback!
K
kate_ee
Hi there,
Is there any similar setting to use "llike" search in CC v5 ??
thank you in advance !
Kate ee