I have two content type one called audit and one called non-conformance, a non conformance is raised after an audit has been complete and has a an entity reference field to that audit.

An audit contains an entity reference field called auditee which references a user, I would like to give edit access to the non conformance based on the the content of the auditee field in on the content type audit.

I've tried lots of combinations of the rules configuration but can't seem to get access to the field.

Thanks

Comments

Yuri’s picture

You figured this out already?

danharper’s picture

No I never did, I got asked to put this specific project on hold but I will be revisiting it in the next month or so.

Yuri’s picture

Ok i figured it out just now, its simple when the entity reference field allow only one value. Getting a field value from a node through an entity reference field, requires that you first add the condition 'entity has field', for the node and adding the entity reference field. Then again add a condition 'entity has field', now selecting the first node referenced in the reference field, and seleting the field of which you want the value.
In my case i wanted the field value of field_cluster_reference of the node referenced in field og_group_ref, which makes this chain:

Entity has field
Parameter: Entity: [node], Field: field_cluster_reference
 
Entity has field
Parameter: Entity: [node:og-group-ref:0], Field: field_cluster_reference

However, I still need to figure out how to add all values of all referenced nodes as a list, I guess I need a loop for that..if anyone can give a hint, would appreciate it.
Thanks

danharper’s picture

I think under actions you add loop, so for every value found do something.

TR’s picture

Issue summary: View changes
Status: Active » Fixed

This question was answered long ago.

TR’s picture

Status: Fixed » Closed (fixed)