About dynamic control of ionic checkbox

I want to create a checkbox that depends on the state of a custom state, but dynamic control of ionic checkbox doesn’t seem to work well.
For example:
There is a custom state in yes/no format, and you can toggle yes/no by clicking on the checkbox and another group.
This is actually to include the click range of the checkbox to the label part, so that the checkbox will work when you click on a group containing the checkbox and text.
At this time, if workflows are set for both the checkbox and the group, it seems that they do not switch properly depending on the state of the custom state.

Please refer to the following capture.
Is there any way to avoid this?

Animation
スクリーンショット 2024-02-18 020615

It seems to be a bug in the plugin. Its generally best to avoid relying on plugins as there might be bugs… but you could send an email to the plugin author and see if he can help you.
Before doing that you could try using the ‘reset group’ action after setting the state, and this might force the plugin to reinitialise.

While we are here, a useful trick to avoid having to use two workflows to change a yes to a no:
Set the state to Index yesn is no. This will evaluate to a yes when the state is no, and to no when the state is yes, allowing you to use a single workflow to change the state.

1 Like

Great… your answer was perfect, thank you

By the way, does this trick only work in yes/no format?
For example, in another place, when selecting multiple items, the checked item is determined by whether it is in the custom state of the list format.
At that time, the workflow when clicking is a plus item if it is not in the list, and a minus item if it is already in the list, so I think two types of workflows are required.
Is there a way to make this smarter?