Hello :)
I am struggling to understand why flipping a switch with a set onchange action does not trigger the action.
I have also tried with a checkbox and its onchange event, but that did not work either.
I have tried debugging, but it never enters the action at all.
I also checked Service Center for errors, but found none.
Calling the action with an onclick event with a button does work.
Has anyone encountered a similar issue and knows how to solve it?
Edit:
I cannot share oml, but will add some pictures of the action and the switch properties
Here is a picture of the action - it is a simple assign to an attribute value of the entity, update the entity and display a message on the screen.
Here is a picture of the properties of the switch:
The switch held a boolean value attribute from the aggregate the action is updating (e.g. "GetAggregate.List.Current.BooleanValue"). By clicking the switch, this boolean should've changed from false -> true and vise versa, as well as the entity would update.
Hello Anders,
Make sure that the OnChange event is pointing to the correct Action and not to another one that can be triggered.
I will attach an oml with a Switch and a Checkbox that triggers a message on the onChange Event so you can take a look.
hope it helps!
Paulo Rosário
Hello
Thank you for your reply, however that is not the issue. The button, checkbox and the switch all call the same action, but it only works through the onclick event of the button
Hi Anders Stene,
Can you please share .oml file because it doesn't matter how many widgets calling same action it should trigger when it's called by any of those widgets.
Thanks,
Arun
Sorry, I miss understood.
I ran the same oml but with all the elements pointing to the same action and added a button.
In my case, it works fine, but it's a simple message. Could it be that you have some custom logic that checks which is the source of the click and does different things accordingly?
Could you maybe share a screen of the action?
Hi, I edited the post now and added a couple of pictures :)
Hi @Anders Stene , were you able to solve the issue?
Can you share an oml or a screenshot? Or, perhaps, do you have logic in you 'OnChange' action that's preventing you from achieving the desired result?
Can you add a message to your flow to check whether it is working fine or not,And it is only happening on a On change action, except your debugger is working fine?
Thanks
As stated, it never enters the action when it is called through an onchange event of the switch.
The debugger is probably not the issue, as it stops on breakpoints in other actions and breakpoints in the action in question when called through onclick with a button.