When setting provider events, you have to specify a handler of type Object. AFAIK, you cannot pass event parameters. How can I access these.
In my example I want to handle the "moved" event of the OutSystemsUI carousel:The GetCallback node returns an object: $parameters.Callback = $actions.OnMoved;
SetSplideEvent is called as follows:
But the "moved" event has some parameters (newIndex, prevIndex etc.).
How can I pass them to my OnMoved action? In the JavaScript node I cannot provide parameters to a client action
See: https://success.outsystems.com/documentation/11/developing_an_application/design_ui/patterns/using_mobile_and_reactive_patterns/outsystems_ui_pattern_extensibility/provider_client_actions/
Thanks!
Hi @Rogier Olde Dubbelink,
You actually can, you just need to add the expected options as Input Parameters. It will map any InputParameters you have defined on the Callback Action.
I attached an oml with an example!
Best regards,
Bernardo Cardoso
very cool !
is this working by parameter position ? i.e. if im only interested in the 3rd, i still need to specify the other 2 ?
And the name I would give them doesn't really matter, as long is I make sure they are the correct data type ?
Dorine
Works like a charm!
Thanks a lot, Bernardo!
Hi Dorine,
Yes, it's by position, which means you need to have all the params defined, by the correct order!
Bernardo
Hey @Bernardo Cardoso I'm a bit confused about passing parameters to the function called when you click the carousel.
I have the carousel and when I click a carousel item I need to update a variable with a specific identifier that comes from the database and display a popup that will get content based on the Id passed.
For example if carousel with the items Meat, Fish and Veggies, when I click "Fish" I need to update a local variable with that Id and show the popup.
I can get the action show the popup to work but how can I set the variable with the correct Id?