Rule condition: if field is empty?

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

Scenario: The member has completed the Annual Certification requirement. Change the OG Group membership from 'Intern' to 'Tech', if this is their first time Certification. Confirmation that this is their first Certification comes from verifying that the Previous Years field is empty.

Field previous_years is a multiple values CCK field. Do you see anything wrong with my php code? It should Return '1', if the field is empty.

ON event After updating existing content

IF...
Updated content is type XYZ
AND
Updated content's field is 'certified_year'
AND
Check a Truth Value:
<?php (empty($node[node:field_previous_years][0])) ? '1' : '0'; ?>


Update: I found the solution.
<?php (empty($node->[node:field_previous_years][0])) ? '1' : '0'; ?>

Rules

Group organizers

Group categories

Categories

Group notifications

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