3

I am currently working on a problem where, when a Physician node has been unpublished, its related Review nodes will be unpublished as well. They do have an entity reference built in to distinguish which Review belongs to which Physician.

I have been working with the Rules, Views Bulk Operations (VBO), and Workflow modules to get this to work.
I have many failed attempts using the Rules module, so I don't have any code to supply.

Would anyone be able to point me in a direction?

3

Yes this seems perfectly possible with Rules ... In your case, the crucial part of such rule is a Rules Action to perform a Loop. If you're not familiar with such loops, then I strongly recommend to have a look at the tutorial titled "Lists and loops".

In your case, you should use (at least) have a Rules Action to create a loop related to your 'related "Review" nodes' (as in your question). After you do, you should iterate over each item in that list. And for each iteration you should then perform a Rules Action to "unpublish the review being processed in the loop".

Done

PS 1: Refer to my answer to "How to set multiple values to an unlimited Term Refence field with Rules" for some sample rules that are like a variation of your question here.

PS 2: I assume this is about D7 ...

3
  • Thank you for the great direction! I will give this a go for sure. And yes this is D7, definitely should have added that. Aug 30 '17 at 19:09
  • Excellent! Got the appropriate tag on there and checked your response as the best answer. Aug 30 '17 at 19:28
  • @NickGordon: merci for the "accept", and the update of your question ... PS: if you have additional questions later on about all this: get back to here! Aug 30 '17 at 19:35

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.