I am trying to create a Rule (using the Rules module) that fires off an email when the capacity of registrations for an event get full. We have set this up using the Registration module.

I set this rule up like so:

  • Event = Upon new registration.
  • Condition: Data comparison - registration:count.
  • Action = email author.

In the manage registrations tab the registration-count is always 1 for each user. So I wonder how I can check the capacity for the event to trigger the email.

I have tried to search for information and try many scenarios, however not finding one that works.

I would like some idea(s) or path to a solution I am not thinking of.

2 Answers 2


The Entity Registration module (not just Registration ...) is all about entities. So it should work together with the Rules module pretty well.

If you can't get it to work ysing that "registration-count", you might want to try adding the Entity Reference Count module. Some more details about this module (from its project page):

This module provides an easy way for an entity to keep track of how many other entities are currently referencing it through Entity Reference fields attached to other entities.

Another approach is to use the Flag module, whereas each time somebody registers for the event, you flag the event. With an additional rule you then just check the number of times the event got flagged (should be equal to the event count).

Note: the video about Drupal 7 Entity Registration Module shows (around 4:55) the (mandatory) "Capacity"* field also, which you might want to use to limit the maximuim number of registrants (use "0" for no limit).


The Rules module is a very flexible framework and it has a comprehensive api. While you may be able to accomplish your task using just the UI you may find it easier implement one or couple of hooks to alter your existing condition, or perhaps, add a new condition to be used. For example,

 * Implementation of hook_rules_condition_info().
 * @ingroup rules
function yourmodule_rules_condition_info() {
  return array(
    'yourmodule_condition_example' => array(
      'label' => t('Compare two users'),
      'arguments' => array(
        'user1' => array('type' => 'user', 'label' => t('First user to compare')),
        'user2' => array('type' => 'user', 'label' => t('Second user to compare'))
      'module' => 'user',

If you decide to go this way, you may want to check https://drupal.org/node/298533

  • thanks for the reply. While this is not my strong suite and I am open to learning. I won't have the time to test and play with this for the production site. If you have any ideas for going through the rules ui that would be awesome. I look forward to finding time to test out your ideas.
    – timwhelan
    Commented May 23, 2014 at 20:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.