Forums

CC6 'IS NOT NULL' Where Condition

CSDweb 23 Dec, 2017
How do I set a Where Condition for a data read in CC6 to only return non null items? With it set to Placetitle.title:{data:placetitle_title} all records are returned. I've tried Placetitle.title:{data:placetitle_title <> ''" } and Placetitle.title:{data:placetitle_title IS NOT NULL } but then only null/empty records are returned.
CSDweb 23 Dec, 2017
UPDATE: I think I might have worked on this issue too long yesterday. To get the full listing of records, the Where Conditions dialog is left blank. Putting Placetitle.title:{data:Placetitle.title} into it, only returns records that are null/empty whereas I want to be able to get just the non-null records returned.
Max_admin 25 Dec, 2017
Answer
Please try this in the "where conditions" box:
Placetitle.title/IS:Null

or
Placetitle.title/IS:{value:null}


You may also use "IS NOT"

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
CSDweb 25 Dec, 2017
Thank you. This is very useful feedback.
CSDweb 25 Dec, 2017
UPDATE: Using Placetitle.title/IS:NULL as a where condition results in an error, "You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''NULL' LIMIT 100' at line 1". Using Placetitle.title/IS NOT:{value:null} works so now I just need to figure out how to use the selected value from the dropdown to dynamically populate a text field in the same form.
Max_admin 27 Dec, 2017
Hi CSDweb,

So you can use:
Placetitle.title/IS:{value:null}


If you want the dropdown selected value to populate a text field in run time then a javascript function will be needed to do that and you can trigger it in the dropdown field events section.

Best regards
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.