Questions tagged [rules]

Use it for questions about the engine which allows site administrators to automate actions: the Rules module.

Filter by
Sorted by
Tagged with
2
votes
3answers
567 views

How can I display the value of a variable inside a condition?

I have created a rule using the Rules UI. My rule is not working, and I need to debug it, displaying the values of my variables inside a condition where I make a comparison. I see within Rules ...
5
votes
1answer
2k views

What's the alternative to using the Conditional Rules module?

The Conditional Rules module allows for including Rules Conditions within Rules Actions (using its If/Else constructs), something you cannot do by only using the Rules module. Here are just a few (out ...
5
votes
1answer
2k views

How to create a node from a Webform using rules?

I want to create a node based on a webform data using the Rules module. This is because of a complication surrounding relationships within the associated CRM system. I am already at the point where ...
6
votes
3answers
1k views

How to prevent a node being saved when using the Rules module?

Is it possible to prevent a node from being saved with Rules? This is what I do now: Create a rule Before saving content of type ''. Condition: IF ... TRUE => Redirect & set message Create a ...
0
votes
1answer
1k views

How to make the permissions of a module more granular?

Assume a (contributed) D7 module, say module ABC, comes with only a few permissions (which can be set on the typical /admin/people/permissions page). For example: Administer module ABC. Access (view) ...
6
votes
1answer
2k views

How can I compare data comparison with values submitted in a webform?

I am trying to use webforms with the Rules module. How can I compare data with the values submitted in a webform ? For example, if the webform has a yes/no radio button, how can check the submitted ...
1
vote
2answers
2k views

How to specify a Rules event like “Content is 'going to be' viewed”?

To answer the question about "How to restrict access to a node via node/12 and allow access via a path like content/sometitle?", I thought it should be possible to use the Rules module to do so. I ...
2
votes
1answer
906 views

Rule to store user's last post date and scheduled rule based 30 day reminder

In this scenario, user's can post 1 node of a specific content type every 30 days (interval changes depending on user role). We are using node_limit to accomplish this; it's doesn't play with rules. ...
6
votes
2answers
4k views

How to use the Rules module to implement a custom redirect for an outdated URL?

I used to show content from a catalog via the Views module, accessing an external database, so that all of the URLs would be something like /content?name=[name]. For various reasons, I've opted to ...
1
vote
1answer
494 views

How to set multiple values to an unlimited Term Refence field with Rules

I have two content types: Ingredient and Recipe Sheets. Both Ingredient and Recipe Sheet have a term refence field called Allergens. Ingredient has the Allergens term reference field filled in. IE: ...
2
votes
1answer
268 views

Which user related token(s) can be used to create a Rule for setting up a message type?

I have created few activity logs using the Message module. All works ok, but when I try to create a message type for example "username started following you on github". When setting up the rules for ...
2
votes
3answers
2k views

How to specify a Rules condition related to select list values?

I'm now thoroughly confused about trying to set a Rules Condition on a select list. There are two things I want to do: (a) On a new node of my content type I want to trigger when a certain checkbox ...
1
vote
1answer
174 views

Which Rules condition can be used to email a user when an admin updates their profile?

I am trying to set up a rule (using the Rules module) that will email a user if their user record has been updated by an admin. It is easy to generate an email when their profile is updated, but I ...
2
votes
6answers
3k views

Is there a simple way to notify users about new posts on the site?

I want my users to be able to "subscribe" to new content that is posted on my site. I've looked at the Notifications and Subscriptions modules and they are just massive! I've also looked at ...
2
votes
1answer
87 views

How to integrate messaging into a custom module?

I'm working on a custom module to handle time off requests for an intranet site and I'd like to be able to have the module fire off email notifications to a configurable list of users -- specifically, ...
5
votes
6answers
4k views

How to add a custom icon or symbol to a flag link?

I'm working on a 'sample request' implementation for a commerce site using Flag, Views, sessions and a little custom code. I'd like to add an icon or a symbol to let people know that an item they are ...
1
vote
1answer
511 views

How to access commerce_product field of line-items using Rules to flag the Commerce Product?

Related to this question: How to mark product if it has already been purchased by current user? I have a Drupal Commerce shop, where I'm trying to use the Flag module to mark products to inform users ...
2
votes
3answers
938 views

How to add up all items of a field collection field using Rules?

I have a field collection with unlimited values. Inside this field collection, there is a field called Price (field_price). I would like to addup all prices that are inside the field collection to ...
2
votes
3answers
720 views

How to check whether one's current User Points are negative with the Rules module?

My question is pretty straightforward: how can I check whether a user's current amount of User Points is negative with the Rules module? I'd like to create an action that should be activated when the ...
4
votes
2answers
10k views

how to create rules to send email notification for node reference content?

I have two content types: job posting and job application. The job application content type has a node reference field for job posting. Whenever users create a job posting node, other users can send ...
0
votes
1answer
333 views

How to show authorized users a link for relevant Views results using the Rules Link module?

Assume a list of entities, created by the Views module. For example a list of "All blocked/active users" which looks like so: User name Active Created date Last login Hillary.Trump No ...
1
vote
2answers
630 views

How to concatenate all token values of a list in a single field within a Rules loop?

I am attempting to send a list of uploaded files on a newly created node via email. In a content type, I have a File Field that allows unlimited values. Within Rules, I created a loop calling the ...
0
votes
1answer
123 views

How to configure the CONTEXTUAL FILTER in a View for Rules?

I want to make a component that receives a user as parameter, and will then do something with some of that user’s content. That something is: delete nodes of contenttype FICHE that have a due date ...
0
votes
3answers
760 views

How can I set a reminder for a specific user to be triggered on a specific date?

How can I set a reminder for a specific user to be triggered on a specific date (in a Drupal 7 site)? Example: I want to remind the user regarding particular event such as hepB vaccination day. Any ...
3
votes
3answers
6k views

How do I use rules scheduler to disable and enable a commerce product entity based on certain date fields?

I have a commerce product type (entity not display node) with two date fields (enable_date and disable_date). What are the steps to create a rule/component and use rules scheduler to schedule these to ...
2
votes
1answer
89 views

How to use Rules to send an E-mail after saving a new comment, to users who checked a boolean in their profile?

What I try to achieve with Rules: After saving a new comment, this comment has to be sent only to those users who've checked a corresponding boolean box on their profile page. Any suggestions?
5
votes
3answers
1k views

Why is my rule that reacts on event “After updating an existing user account” firing twice?

I have a rule that e-mails me if a user updates a value of a field on their profile (this value is the name that is displayed for that user on the site; I e-mail changes to the names to make sure no ...
3
votes
1answer
573 views

How to check for product taxonomy term in Rules actions (Ubercart)

I am using Drupal 7 with Ubercart. I am trying to configure to send an email when customer makes a purchase of a product mapped to one particular taxonomy term. I tried adding actions in a custom ...
3
votes
1answer
914 views

How to iterate over all field collection items in an eMail body using Rules?

I'm trying to write a rule (using Rules) that will send an email to users of a role. Within the body of the email, I'd like to display the contents of a nested field collection. I've tried using what ...
2
votes
1answer
145 views

How to access current amount of earned userpoints in a Rules Condition?

I have no access from Rules to [points] field or any userpoints field (User points module). I have enabled: Rules, Rules scheduled, Rules_ui, Userpoints, Userponints_rules_integration, ...
12
votes
5answers
18k views

How to redirect anonymous users to login page using Rules module?

I'm using rules module with drupal 7 in order to redirect anonymous users to the login page, so I created a rule with react on event "Drupal is initializing", condition "User has role" with anonymous ...
9
votes
4answers
2k views

How can anonymous users be allowed to post while still maintaining content integrity?

A little background: As you see on http://charlotte.ebayclassifieds.com, if you click 'post an ad' and then choose a category, you can fill out the form and submit content without having to sign up. ...
7
votes
3answers
7k views

How to pre-populate fields on a node creation form based on fields from Profile2 module?

There is a content type ("Job Listing") that a business account can use to list job openings, and a Profile2 profile for each business that contains the business's address, organization name and ...
4
votes
2answers
3k views

How to debug a rule that doesn't want to fire?

I have nodes that can be flagged with a global flag. When a node is updated I want a rule to unflag that node. Rules Event: After updating existing content Rules Action: Unflag a node. I then ...
2
votes
1answer
575 views

How to revoke edit access to the node's author after publishing a node?

I am trying to build a new rule on Drupal 7 with both the Rules and Content Access modules (and its sub module Content Access Rules integration). Thus, I get new actions like "grant or revoke an ...
3
votes
2answers
305 views

What's the difference between combining Rules conditions with AND and just have them follow one after the other?

Is there a difference between using AND in Rules Conditions and simply adding Rules Conditions one after the other?
2
votes
1answer
276 views

How to include only an updated custom field in an email created using Rules?

I used the Rules module to create a rule with an event "After update existing content". This rule sends an email to the editing user when that user makes an edit to one of the multiple custom fields ...
1
vote
2answers
83 views

How to grant userpoints only for modifying nodes last changed at least 20 days ago?

I am not sure how to go about this. I use the Userpoints module in Drupal 7 to attribute points to users who create nodes ('reviews'). I also want to allow them to gain some points if they supersede ...
24
votes
5answers
7k views

How can I quickly re-save all the nodes on my site (to trigger a rule that activates on content update)?

I made some mistakes configuring a certain content type on my site. To fix these mistakes, I made a rule that performs some actions "when existing content is updated." However, I don't want to go ...
23
votes
1answer
13k views

Programmatically execute an action set (Rules module)

I want to use Rules UI to define some action sets, but want to execute those actions programmatically from a custom module. How to I execute the action by code and pass the needed arguments (just a ...
14
votes
3answers
5k views

How to create Facebook style user notifications?

Using Heartbeat I have been able to effectively make streams of user activities through Rules triggers. However I would like to be able to have users notified of new activities, and keep a count of ...
4
votes
3answers
5k views

How can I schedule a rule to always be run at a specific hour of the day?

I have a rules component that sends me an e-mail containing a view that contains certain statistics about my site. I'd like to have this e-mail sent at midnight every day. The rule looks like this: ...
1
vote
1answer
11k views

Using webform rules to create node after webform submission [duplicate]

First of all, let me explain my project. I want users to place orders of products using webforms and then create a node with a link/reference to the submission and others custom fields. It looks like ...
1
vote
2answers
691 views

How to grant user User Points equal to certain field's value / calculated value?

I've a content type 'Content' with the field 'Value' (an integer). Every time a Content has been published, I'd like to grant the Content's author some User Points, equal to the value in the 'Value' ...
1
vote
1answer
956 views

How to restrict anonymous users to a single product and quantity 1 using Commerce and Rules?

I have a slightly unusual use case in that I want to allow authenticated users to order multiple products and use the shopping cart but I want to limit anonymous users to purchasing products ...
6
votes
1answer
1k views

How to create a view of unread comments on own nodes for the user's profile page?

I'd like to create a view for the user's profile page that displays all unread comments on the nodes he/she created. When I say 'unread', I mean that the page where the comment is situated (namely, ...
5
votes
5answers
621 views

How to grant userpoints to users who perform a login 5 days consecutively?

I need to know if a user has performed a login, for example, 5 days consecutively. The reason for this is I want to award User points to them. For example: User A performs a login on Monday, ...
3
votes
2answers
326 views

How to implement a Rules Condition like [account:last-login] = never?

Here is my contextual explanation: I would like to redirect on a special page for first time after login. But registering system is using an email validation, so the path to the first login is "user/...
3
votes
2answers
849 views

How to create rule to change user role based on points (using User Points module)?

I'm using the User Points module which allow me to grant points to user. So far so good. I need to create a rule to fire this condition/action: When user points are granted, then check if the user ...
3
votes
1answer
312 views

How to implement the mass operations on the Group's members page using Views?

I use the Group module and I want to customize the page to manage the members of the group, created by the module. So I created a view by following the instructions below : How to add a column to ...