I have a content type in which there is an entity reference. All content of it is set to unpublished by default and upon creation a rule is run to assign an organic group based on the selected reference.
Now, upon publication of the content I want to have an incremental number assigned to a node based on the entity reference it contains. For example:
Node1 ref:abc c:1
Node2 ref:def c:1
Node3 ref:abc c:2
Node4 ref:abc c:3
Node5 ref:def c:2
How can I achieve this?