Buy Now
Sign in

CC6 'IS NOT NULL' Where Condition

CSDweb , December 23 2017, 06:07
C
CSDweb 25
December 23 2017, 06:07 #374227
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.
C
CSDweb 25
December 23 2017, 14:53 #374232
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.
admin 28
December 25 2017, 08:51 #374244
 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
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!
C
CSDweb 25
December 25 2017, 14:08 #374247
Thank you. This is very useful feedback.
C
CSDweb 25
December 25 2017, 14:36 #374248
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.
admin 28
December 27 2017, 17:34 #374262
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
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!