Is it possible to trigger an action from within a custom widget? e.g. with a button in the custom widget (not in workshop). I know that it is possible to trigger events. But what about actions?
I am not sure it can be done directly today, but you can easily workaround by creating an overlay with an embedded action form. You can then pass through an event that opens the overlay.
Yes, you should set up parameters in custom widget with all the values that you want to pass to an action and create a variable which this parameter will be linked to. And finally pass this to the action that you have created
Just for completion, if anyone is looking for an answer.
Triggering actions with a button in workshop is pretty straight forward. But if you want the button to be within the custom widget it’s slightly more complicated.
Events:
these are easy to trigger. You can create a parameter in the custom widget code that is connected to an event and have a button (or anything else) emit the event to workshop
Actions:
This is a bit more tricky. You need to enable ontology sdk for the widget set and import the action you created. you can then call it from withing the custom widget code.