Use Case: If node of certain taxonomy terms exist use as reference, if not create it first

Events happening in the community are now at Drupal community events on www.drupal.org.
dereckd's picture

I've searched for the answer to this question before asking here but I'm stumped. I also found a number of people with similar questions but no answers. I also posted this on stack exchange ...

http://drupal.stackexchange.com/questions/19059/rules-help-check-to-see-...

Here is my scenario;

I have two node types that are related by a node reference. Essentially Content Type A is a container, and Content Type B is an item. For illustration sake I'll call content A Box and content B Item. the Item has a number of taxonomy terms that are shared with Box. Again for illustration sake lets call them color and size. What I'm trying to do is set up a rule that does the following;

On Creation of an Item ( actually before the content is save) check to see if there is a Box that shares both the color and the size of the item, if one exists, assign the new item to that box (via node reference). If one does not exist create the box, then assign the new item to that box.

I'm new to rules and although it seems really powerful, I'm just not sure that this particular use case is possible. The part that I'm most unsure about is how to check if the box with certain terms exists.

Rules

Group organizers

Group categories

Categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: