[eca_views]: How to get the actual View result in ECA

Created on 6 September 2023, almost 2 years ago
Updated 15 September 2023, almost 2 years ago

Problem/Motivation

I built a View to count how many content entities there are on my site, by (published) status and entity type as contextual filters.
This returns just the actual integer (also for performance reasons) to be used in an ECA model for allocating/accounting costs/credits to users.
The problem is that when I add the "Views: execute query" activity in eca, the token returns all the base field values for every content instead of the count result (which I instead get from the Views UI preview):

I've already read the related issue #3343891 so I wonder, is this possible at all? What would be the workaround? 🙏🏻

Proposed resolution

Use the "eca_render" submodule, pick the activity "Render: Views", select the View and fill the arguments (ie. contextual filters) and define the token name to be used in later actions of your process as before; no need to add to the render array in this case so you can leave empty the "Machine name" and "Element weight" fields.

Remaining tasks

💬 Support request
Status

Fixed

Version

1.1

Component

Documentation

Created by

🇮🇹Italy kopeboy Milan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024