2

I created a page where users can submit friendly games. Other users can show their interest by flagging (Flag A) these games.

The author of the game can see all prospects in another view (View 3 integrated in View 2 with Views field).

The author than can choose which prospect for a friendly game he accepts. He does this by flagging the prospects flag with an accept flag (flag B).

The accepted prospect than gets an email confirming the friendly game.

How is it possible for me to send emails to all prospects who did not get accepted?

I tried Rules (on flagging event) and Rules Link.

How do I tell Rules what friendly game node this is all about?

Screenshot

Hello, thank you for your ongoing help! I created a list of friendly games with relationships and contextual filters that display these users.

When I use "Load a list of entity objects from a VBO View." or "entity ids" drupal throws error messages at me.

Warning: Invalid argument supplied for foreach() in _views_bulk_operations_get_field()

Another really strange error for this rule is "Illegal choice blog in type element." The view does not display blog types... I'll try to figure this whole mess out.

Another problem in my opinion would be that in my view is a contextual filter that gets the NID of the friendly game by the view it is integrated in by "views field module". So how does the view know what users it should display if I loop it with a rule? Wouldn't it just loop through all users that flagged any friendly game who are not flagged?

  • Can you think of a way to create a view of users that correspond to all those "prospects who did not get accepted" for a given game node? Also, why did you use "panels" in your title and as an extra tag (does that really matter)? – Pierre.Vriens Sep 14 '16 at 12:43
  • I could create a node view of "friendly games" that shows only the users that flagged this node but who's flags are not flagged. i.imgur.com/F1romld.png I tried to create a user view in the past but could not figure it out. I put panels in the header because I do not know if it is relevant for the communication between rules and views. I think somehow this communication has to happen so rules knows it should use only the users from a specific node. – fruitsalad Sep 15 '16 at 13:47
0

If you can create a view (using the Views module) of those users that correspond to all those "prospects who did not get accepted" for a given game node, then you can process the results of a VBO enabled view via Rules, using a rule that looks like so:

  • Rules Event: After flagging the prospects flag with an accept flag (flag B).
  • Rules Actions:
    • Load the VBO list of the users in your View.
    • Add a loop to perform a Rules Action "Send an eMail", for each user contained in your Views results.

For more details, have a look at the tutorial "How to process the results of a VBO enabled view via Rules?".

  • Hello, thank you for your ongoing help! I created a list of friendly games with relationships and contextual filters that display these users. – fruitsalad Sep 16 '16 at 16:32
  • I had to edit the main question. The comments did not allow the amount of texts. – fruitsalad Sep 16 '16 at 16:42

Your Answer

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

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