I feel like there’s something missing in my understanding of component events.
I have a card, made into a component. On a button click there’s an event being triggered.
The event has a workflow “on_event” on the parent outside the component. This is all fine.
What I was trying to achieve is the following.
OnClick, before sending the event, I want the component do to some work and send a payload with the event (using event value).
I don’t seem to get where I can access that payload within the event workflow ??
Yes thank you. I watched all those articles and videos and it doesn’t cover the event payload. Just the event triggering.
But I did figure out how it works. I had to use the console log to catch the payload and understand the structure in order to catch and cast it properly on the event “triggered” side of things.
The problem is that you can’t see what the payload is live during execution. Since you can’t put a debug breakpoint in workflows, you can never catch the “event triggered” and look at what’s happening.
As you can see here, the ‘Event’ is always undefined.
Also, for the ‘event’ variable to appear in the bottom browser, you have to execute your event trigger at least once.
You need to define the event (trigger schema) in the settings. The events are usually not available like this , because the event has’t happened yet. So I think you might just want to log the empty event and attempt to trigger it in order to see the payload.