Forums

Search results not using WHERE rules in data read

zest96 16 Sep, 2020
Hi,
I have this in my data read and that in my searchable fields
The table view shows records as expected.
But search results shows records without respect for the WHERE rules.

How can I make the search respect those rules?
(please don't give me just hints, cause i tried too many combinations in searchable fields)




Max_admin 17 Sep, 2020
The searchable list is wrong, it only takes fields names!

All the conditions do not work ?
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
zest96 17 Sep, 2020
Answer
1 Likes
Found it!
Took me some time to figure out the right syntax and it wasn't obvious.
Here is the working stuff:
note the only difference is the ( ) brackets at the beginning and end of rules list.
now not only list shows the filtered rows but the search keeps these filters.




zest96 20 Sep, 2020
it didn't work until I added the brackets.
do you mean I shouldn't have put the MODEL ?
which is correct?
this? (in which the debug query looks correct, and the results are as expected)
(
Model.field_name
OR
Model.field_name
)

or this?
(
field_name
OR
field_name
)

or this?

field_name
OR
field_name
webbusteruk 11 Oct, 2020
You need to add the brackets and OR in the top part, not the multiline list. Click on the "+ operator" button and change to "(" , ")" and "OR", and arrange it accordingly.
(
Model.field_name
OR
Model.field_name
)
(
field_name
OR
field_name
)
Both should work.
Max_admin 16 Oct, 2020
please use v7 as the conditions settings are clearer to setup and do not need guessing about the syntax!
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
attiliomilli 10 Jan, 2021
Search results don't use WHERE rules in data read when I search %.

I have the same problem!

Max_admin 13 Jan, 2021
what does the debug show ?
Max
ChronoForms developer...
Did you try ChronoMyAdmin for managing your Joomla database tables ?
This topic is locked and no more replies can be posted.