In my case, user can flag a term. A rule fetches users who flagged a term.
Now can i use several numbers in the Data-Selector.
Now i've [node:field-rubriek:2]. I could also use :0, :1 and :3.
See screenshot
screenshot

What is the purpose of these numbers?

At the bottom is my export of the rule. It's sending mails to users who have flagged a taxonomy-term. When someone adding a node with a taxonomy-term, subscribed users are getting a mail.

When using :0, only users from the first term are mailed.
Didn't test it further,

{ "rules_send_mail" : {
    "LABEL" : "Send mail",
    "PLUGIN" : "reaction rule",
    "OWNER" : "rules",
    "REQUIRES" : [ "rules", "flag" ],
    "ON" : { "node_insert" : [] },
    "IF" : [
      { "node_is_published" : { "node" : [ "node" ] } },
      { "entity_has_field" : { "entity" : [ "node" ], "field" : "field_rubriek" } }
    ],
    "DO" : [
      { "flag_fetch_users_taxonomy_term" : {
          "USING" : {
            "flag" : "inschrijven_rubriek",
            "taxonomy_term" : [ "node:field-rubriek:2" ]
          },
          "PROVIDE" : { "users" : { "gevlagdegebruikers" : "Users who flagged" } }
        }
      },
      { "LOOP" : {
          "USING" : { "list" : [ "gevlagdegebruikers" ] },
          "ITEM" : { "list_item" : "Current list item" },
          "DO" : [
            { "drupal_message" : { "message" : [ "list-item:mail" ] } },
            { "mail" : {
                "to" : [ "list-item:mail" ],
                "subject" : "Nieuw bericht [node:title] op [site:name]",
                "message" : "Lees meer op [node:url]",
                "language" : [ "" ]
              }
            }
          ]
        }
      }
    ]
  }
}
CommentFileSizeAuthor
#2 screenshot-2016-03-05-21-26-19.png92.27 KBMatthijsG
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MatthijsG created an issue. See original summary.

MatthijsG’s picture

Issue summary: View changes
FileSize
92.27 KB
MatthijsG’s picture

Issue summary: View changes
TR’s picture

TR’s picture

Status: Fixed » Closed (fixed)