Hello,

I need to create a simple report, but I'm having trouble figuring out how to design the query. I was hoping somebody with more experience might be able to give me a nudge in the right direction. Here are the parameters:

I have two content types: "Projects" and "Actions." Each Action contains a node reference field linking it to a specific Project.

I need to view all projects and their associated actions. At first this seems simple, but we run into problems when we try to catch the Projects that have no Actions.

How can I design a query that will show me all Projects and their associated Actions that includes Projects that have no Actions? Or at the very least how can I design a query that will show me only Projects with no Actions?

Thanks for any assistance.

Comments

merlinofchaos’s picture

Status: Active » Fixed

The easiest way to accomplish this might be to use views_field_view -- have a view that lists projects and then each project then lists actions.

The other way to accomplish this would be to use something like the node_referrer module and list projects and use the backreference to get actions. It's much less powerful than what you can get from views_field_view, though.

mehoo462’s picture

This is perfect! Thank you so much.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.