I have a content type called "news" that has a node reference to a content type "organisation".

I can make a view that returns all news for a specific organisation, but I want by default to return news that DOESNT reference any organisation. Seems that views 2 does a left join, so I thought a default value of "null" would suffice to select rows that don't match but it converts my "null" to a "0" in the sql.

Any idea how to do this ?

Comments

exobuzz’s picture

Basically I need the ability to do a "IS NULL" as a default argument. Does views have this capability and if not, where would I start to add this ?

jjemmett’s picture

subscribe

gamesnet2’s picture

Can I ask how you made a view that shows news for a specific organisation, im struggling! thanks

exobuzz’s picture

Relationship on

"Organic groups: Group node (post)"

Argument (requiring relationship)

(Group node (post)) Organic groups: Group node

node type: News and published

I have a custom template for my group nodes, that then calls the view with the group node id as a view parameter.

macramole’s picture

Version: 6.x-2.5 » 6.x-2.8

suscribe

Letharion’s picture

Status: Active » Closed (fixed)

Hello!

I'm cleaning up the Views issue queue, and thus trying to close open support requests that have had no activity in the past 6 months or more. If this is still a relevant please reset the status to active, and the new bug squad will make an attempt at the problem.