Skip to content

Views: Execute query

Available since: 1.0.0

Use a View to execute a query and store the results in a token that contains an indexed list of the results. Despite the type of view that you use, always get the complete entities obtained by the view. You can access the entity properties using the token style.

Query results are complete entities, not field-configured output

The result of this action is a list of complete entity objects loaded from the database. It does not reflect the field configuration of the View (i.e. which columns are selected, how they are formatted, or which labels are assigned in the View's field settings).

This means:

  • All entity properties and field values are available on each result item, regardless of whether they appear as fields in the View display.
  • Conversely, computed or rewritten fields that only exist in the View's display configuration are not part of the result.
  • Field formatters, labels, and display settings configured in the View have no effect on the token values you receive.

To access values from the result list, use the token name you configure below together with an index and entity property tokens, for example [my_results:0:title] for the title of the first result entity.

Fields

Name of token

Name of the token available after view execution. Contains an indexed list of elements that the view returns. Please provide the token name only, without brackets.

View

Select the view from the list. The view will always return a list of complete entities.
When using the "Defined by token" option, make sure there is a token with this name: eca_views_query_view_id

Display

Write the view display id to execute. Set as default to use the default view configuration.

Arguments

Provide the values for contextual filters in the same order as they are defined in the view. Separate multiple values with the / character.