Buy Now
Sign in

CC6 'IS NOT NULL' Where Condition

CSDweb , December 23 2017
Answered
C
CSDweb

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

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

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!

C
CSDweb

Thank you. This is very useful feedback.

C
CSDweb

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

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!