![]() Tip: When selecting the data type for variables in the view, if the field is an entity identifier (e.g. ![]() Views loop: A views loop is similar to a regular Rules loop, but allows looping over rows of view results.Ĭollect view result rows (action): This action collects each variable in all view result rows into list variables for use in Rules. provides two types of elements in Rules, configured with a "Rules" view display: The Views Rules module makes Views data available in Rules, enabling intuitive rule configuration for dynamic data. A possible answer to your question is by replacing the Rules Action in the rule you already have, and by also using the Views Rules module, as further detailed below. I need to compare it with the field_service_provided (Term Reference field to the same taxonomy vocabulary) in the Profile.Įven though your question doesn't say so, from the format of your exported rule it's clear it is about D7. The project_type is the taxonomy term in the webform. I just have it posting a message right now to test, but I want it to email, but I can't find the data I need to compare in the Rules. I can't figure out how to get Rules to do this. When the webform is submitted, if it matches one of many taxonomy terms in any of these profiles I want an email sent to those profiles. I have a webform that also has this taxonomy term in the select list. When doing so, you'll be able to select the token for file_list_var_for_email_body to include anywhere in your eMail body.I'm using profiles 2 and have (one or many) taxonomy terms that can be selected by a specific profile type. And finetune the details (configuration) of your Rules Action to Send an eMail. Move that Send an eMail action outside your loop, and after the loop completed.Within your loop, for each iteration, prepend or append the value for each list_item to that variable file_list_var_for_email_body (see where we're going?).Say you name the variable file_list_var_for_email_body. Add some new Rules variable that will be used later on as part of the eMail body, before the start of your loop.In your case, you could make it work like so: The trick to do so is similar to what is shown in the Rules example included in my answer to " How to concatenate all token values of a list in a single field within a Rules loop?". However, if what you're looking for (= the list of files as stored in your file field) is not available, then just (a) make it available first and (b) wait with your Send an eMail action until it is available. However, by doing so, your Rules Action to Send an eMail no longer has access to that crucial variable list_item which is like a local variable inside your loop. So yes, that's a way to only execute such Send an eMail Rules Action 1 time (instead of for each iteration of the loop). And instead that Send an eMail Rules Action should only be performed 1 time after the Rules loop is completed finished". With that " move Email to the left", you must mean something like " Using the Rules UI, I change the Rules Action to Send an eMail, so that it is no longer considered as one of the Rules Actions to be performed for each iteration of the loop. When I move Send Email to the left, I cannot access the " list_item" variable. That's not really what you want of course. Your rule works as implemented: for each iteration of your loop, you have a Send an eMail action. The Rules Action to Send Email is in a Rules loop, and I get one email per item in list
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |