Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.
Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
#829665
Hiya, I seem to be going around in circles with this one - boiled it down to a simple case I can't get past.

I have a variable boolean "ayesno" which is bound to a dynaform checkbox field then there's a routing rule depending on the result.

My routing rules are
Task2 --> @@ayesno == 1
Task1 --> @@ayesno == 0

In every case (removing spaces, trying 0, Flase, FALSE, false, "0", "false" etc, same for 1/True) the case proceeds to Task2 even where the checkbox is unchecked (that is when it doesn't throw a message about both routing cases evaluating to true or false when I tried "true" etc.). I'm sure it's simple, but I searched for samples and couldn't find any, so reaching out for ideas! Can someone point me in the right direction please?
Last edited by paddyrg on Mon Jan 03, 2022 2:57 pm, edited 1 time in total.
#829672
Checkbox values are stored in an array. Try this for your conditions:
Task1 --> in_array('0', @=ayesno)
Task2 -->in_array('1', @=ayesno)

That said, since this is a simple boolean condition why not just use a radio group control with variable data type of boolean?

Here's an example process (Email_Request_New_2012_04_20_16_01_16-6.pmx) attached in the following post, which includes returning the task to the originator based on selection of the radio control:
https://forum.processmaker.com/viewtopic.php?f=40&t=737679

Hope this is helpful.
Want to create your own meme coin?

In the world of cryptocurrencies, a unique and exc[…]

The market for cryptocurrencies is demonstrating a[…]

What's SAP FICO?

Embarking on a dissertation can be one of the most[…]

Hello. For rental housing, there are software solu[…]