views:

40

answers:

1

Whats the best way to have Views pull out records with NULL values for a CCK field?

So far, with a simple filter of 'Is empty (NULL)' in the Views GUI does not return a record for me, but it should (I see them in the database).

I also tried passing it as an argument:

$handler->argument = 'NULL';
return $handler->argument;

No results there as well.

However if i try with 0, (and setting fields to 0) - this works, but I don't want to insert values like that to make it work. Am I missing something?

A: 

This works for me exactly in the manner you want it to work. I tried it with a CCK number and CCK text field. The filter is empty (NULL) works properly as expected.

Perhaps you need to update your version of views and CCK?

I'm using version 6.x-2.11 of views and 6.x-2.8 of CCK.

Sid NoParrots
Maybe. It looks like if you have an argument, but exclude the argument, it still uses it in the views query.
Kevin
@Kevin: I added a filter and thats all I did. Not doing anything with arguments. Do update Views and CCK... I'm pretty sure thats the culprit.
Sid NoParrots

related questions