0

How to get node field values and include it the Rules Action? If I have a custom content type that has taxonomy terms, and I want to display these terms in Action. Example output is simply logging the terms.

  • Event: content type is created
  • Condition: of node type: custom_content
  • Action: Log the taxonomy terms

Pseudo code:

 public function execute() {
    $term1 = field_taxonomy1_fromCustomContentType
    $term2 = field_taxonomy2_fromCustomContentType
    $this->setProvidedValue('concatenated', $term1 . $term2);
    \Drupal::logger('custom_rules')->notice("Rules Action");
  }

1 Answer 1

0

Just in case someone had the same approach as mine. Here is the solution from Drupal.org community.

Your Answer

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

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