2

I have created a custom Rules event, following the instructions in https://drupal.stackexchange.com/a/215857/16550 The event provides a custom node variable:

function MYMODULE_rules_event_info() {
  return array(
    'my_event' => array(
      'label' => t('My custom event'),
      'group' => t('My group'),
      'module' => 'MYMODULE',
      'variables' => array(
        'my_variable' => array('type' => 'node', 'label' => t('This is a node')),
      ),
    ),
  );
}

As expected, the variable my-variable shows up in the available tokens in a new Rule. I would now like to modify a field called Integer of the my-variable node, so I tried adding the conditions

  • Entity is of type: Quiz result answer
  • Entity has field: field_integer

However, I still cannot access my-variable:field_integer in any Rules actions. How can I do that?

Note: As the first Rules condition suggests, my variable my-variable is actually a Quiz result answer, provided by the Quiz module. I don't think it is related to the problem, but one never knows for certain...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.