I have a View of Entityform submissions and I’d like to omit any submission (from the final list/grid) where the value of the field “field_user_company” (type: text) is NOT equal to the value of the current user’s company (“field_company”, type: Entity Reference (to a separate content type called “Company”)).
In the view, I configured a relationship: ENTITY REFERENCE: REFERENCED ENTITY
For: Content entity referenced from field_company
I added a CONTEXTUAL FILTER
For: Entityform Submission: Company (field_user_company)
Next it says: “This display does not have a source for contextual filters, so no contextual filter value will be available unless you select ‘Provide default’.”
I selected: “Provide default value” of type: “PHP Code”
At this point, I’m assuming I need to return the value of the current user’s “field_company” and then possibly create a filter comparing this value to the value of “field_user_company”.
In pseudo code, display row only if “field_company” value = “field_user_company” value.
Is this correct? Am I barking up the wrong tree? Thanks in advance for your help!