3

How to add a specific Organic Group to a node in the action-step with rules (7.2)?

I can't figure out which action and which options i should use. Now i've something like

**action**
Set a data value
Parameter: Data: [node:og-group-ref:0]

But this isn't correct. How can i give the og-group-ref the correct value (the OG is in this case nid 180).

  • I hesitate to post it as an actual answer (I might convert my comment to it if it helps) ... But instead of using "Set a data value", you could try to use "Add to list" instead ... The reason why I think this alternative should work, is because of the ":0" part at the end of "node:og-group-ref:0" (which indicates "node:og-group-ref" is an array of values). – Pierre.Vriens Feb 27 '17 at 12:50
0

This is not the correct answer, but i found a different way. If the og_group_ref is set to checkboxes (these checkboxes are essential) (look at admin/structure/types/manage/[YOURCONTENTTYPE]/fields/og_group_ref), you can set the default audience. Now i just hide the field 'audience' for certain roles and new nodes are saved to the right OG.

Again, this isn't the way i asked to do it with rules. When someone knows the right answer how to do it, i'm eager to hear it.

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.