search field

stijnst 30 May, 2017
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
stijnst 30 May, 2017
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.
Max_admin 30 May, 2017
Answer
Hi stijn,

In the where conditions use this:

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


Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
stijnst 30 May, 2017
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
Max_admin 31 May, 2017
1 Likes
Hi Stijn,

Sorry for the typo!

Yes, try this:

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


Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
healyhatman 02 Jun, 2017
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'
"
Max_admin 02 Jun, 2017
Hi healyhatman,

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

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
kate_ee 07 Nov, 2018
Hi there,
​
Is there any similar setting to use "llike" search in CC v5 ??
​
thank you in advance !
​
Kate ee
This topic is locked and no more replies can be posted.