Use the unique values from a field in one content type as a filter in another content type - drupal

I need some help with a Drupal views filter. I'm not a developer but I have been using Drupal for several years.
I have a content type named 'City/Town' that contains several fields including state and county. I'm using this content type as an entity reference field in another content type named 'Project'.
I would like to use a unique value list of States as a filter in a view of Projects.
I've installed the Views Entity Reference Filter (https://www.drupal.org/project/verf) module but I'm only able to access the entity reference title, not any of the fields that are part of the content type.
The project I'm working on is still in design phase so I can change my approach if there is a viable solution.

You need to get the relationship to the reference in views. Then you have access to the fields of the reference for viewing, sorting & filtering.

Related

Drupal 8 Views Question Involving Entity Reference

Trying to figure out views relationships and filters.
I'm trying to make a view that has the title of the page match the entity reference of the same page and make it reactive so I only need one. EX.) Page about animals, which there are nodes referencing the animal page as an entity reference.
Firstly, you have to take one unique field which can identify whether particular node is for animals or etc.
After that, In your views you need to select that field name in contextual filter and select option as you can see in screenshot and then save it.

What is the syntax to add a column to the Custom Form list that shows where in WF it is used?

Super simple.
When viewing the list of Custom Forms in Setup, I want to add a column that shows where those Custom Forms are in use (or null if used nowhere).
This is similar in principle to viewing the list of fields, which has a list of forms on which those fields are used.
What is the syntax I can use to add the appropriate column(s) to the view?
As far as I know, there is no linkage in the backend that connects categories (custom forms) to their host objects. This is probably because the list could be massive and the query would take quite a while to execute as it would have to traverse every object in Workfront or each form would store every parent object ID.
Unfortunately, you can't even search for objects by associated category IDs, so if you wanted to build this yourself you would need to query each object and search its categories to see if your custom form appeared.

how to merge entity reference relationship field value

I am facing problem in drupal views.
In my view display table having relationship with other entity type.
I am not getting desire output. It show duplicate rows with same title due to entity relationship.
I wanted to aggregate entity relationship field with ",".
I already try some module like : view distinct, views_merge_rows.
But did not work for me.
Please suggest some module.
Have a look at Views Calc and if you cant do it in the database Views Aggregator Plus gives you even more options.

Adding a self-referential field

I am creating a new content type called idhhb_node. This content type represents any of the training material available through a company - books, cds, websites, etc. An idhhb_node will have between 1 and 5 prerequisites.
The problem is the prerequisites are also of type idhhb_node, but the pulldown for field type does not allow List(iddhb_node) as a type.
Another interesting thing. It appears that the pre-existing node types are not available as fields either. For instance, a field cannot be an Article or Page even though Drupal 7 comes with those nodes activated by default.
Try using the Entity Reference module, which gives you access to an Entity Reference field type. It allows you to do more than the standard Node Reference fields.

Link some users to a content

I have created a content type called "Event". For each event, I would like to be able to specify contacts (people in charge of organising).
Therefore I would like to add a field "Contact" to the Event type, where a widget would give access to the list of users. One could then pick one or several users.
This field would be displayed as a list of links to the profiles of those users.
I seem to remember there was a module providing that widget in Drupal 6, but I am now using Drupal 7, and haven't been able to find the necessary module!
Thanks!
(NB: I'm not using the Event module, but Date + Calendar.)
Here are two possible options you can check out:
Entity Reference module - can reference user entities
Provides a field type that can reference arbitrary entities
Relation module
Relation is an API module and storage model for both simple and the
most complex relations between entities. The module can handle both
directional and symmetrical relations very well.

Resources