- Issue created by @marksmith
- 🇩🇪Germany mxh Offenburg
Your use case doesn't require using the multiple at once event. Use "VBO: Execute Views bulk operation (one by one)" instead, this should enable you to directly access one entity at a time without the need for a loop. From there on, you should be able to access the main entity of the view row using the [entity] token, e.g. [entity:field_date:value] should be available.
- 🇮🇪Ireland marksmith
Thank you for the quick tip! It's a working solution. A quick repro of how it works (for others, like me, searching):
- Add VBO Execute views bulk op (one-by-one) event and the VBO access event (as per readme.md)
- Load entity action: Load entity from type and ID (in my case commerce Product, ID is: [event:entity:id]) - assigned token name: product_entity
- Entity Get field value action - field name: field_date - assigned token name: current_date_value - Entity: [product_entity] (as established above)
- Field value is now available and I was able to tamper it according to my needs.
Thanks's again for the excellent support!
- Status changed to Fixed
over 1 year ago 11:45am 30 April 2023 - 🇮🇪Ireland marksmith
Thanks again. I have further tailored the script, here's what I found.
Load entity action is, indeed, not necessary. However:
- If I choose the "Display a message to the user" action to display the value of the field_date field, the right token to be inserted in the Message section is
[entity:field_date:value]
, as you suggested. - If I choose the "Get field value" action (or Set field value, for that matter), the token above did not work. I needed to insert only
field_date
in the Field name (without the brackets). - The ECA tamper (used for the Convert date to timestamp action) also uses the tokenized variant in its Data field
[entity:field_date:value]
.
A bit confusing to follow when tokens should be used and when not, but it works, nonetheless.
Thank you for these excellent modules!
- If I choose the "Display a message to the user" action to display the value of the field_date field, the right token to be inserted in the Message section is
- 🇩🇪Germany mxh Offenburg
We're planning to improve that confusion when to just specify a token name only and when to use a token.
Automatically closed - issue fixed for 2 weeks with no activity.
- 🇺🇸United States mmlmitchell Spokane, WA
I am interested in the answer to a question raised in the original post about "VBO Multiple-at-Once."
How do I get the values from a specific field contained in [event:queue]?
For example, I have a content type with a field called: field_description.
I tried [event:queue:field_description], but it did not work.
Any help would be appreciated!