cancel
Showing results for 
Search instead for 
Did you mean: 

Setup WF Condition Using Checkbox Value (Checked or Not Checked)

Former Member
0 Kudos

Developing a workflow where one condition step uses the value of a checkbox to determine the path forward.

Using a form senario and I bring the checkbox field in correctly using Name&Value binding.

When I execute the workflow I can see the value X in the container (when I check the box) and (when I don't check the box) the X does not appear in the container, so that part is ok.

Even when I check the box and there is an X in the workflow container, the condition step seems to be ignoring it. The condition step is setup such that &containerelement& = X (True passes one way and False the other).

Again, i execute the form with the box checked, look in the container in the import form fields step, and the X is there, yet workflow processes as if there is no value.

If I execute the form without the box checked it still follows the same path...

Issue is getting workflow to recognize the X

*My container elements are not set to either import or export - the boxes are both unchecked in the properties.

I didn't think this was the issue though because I have a previous condition step set up using the same pattern and it works fine.

Suggestions greatly appreciated. - Let me know if you need further information.

Ps I tried setting the value to EX or NX as I read from some other posts, but when doing that the workflow stops at the condition step and does not begin to evaluate the condition.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Got it.

former_member185167
Active Contributor
0 Kudos

Hello,

I'm glad you got it but I still have a few questions.

How come when you tried setting it directly in the worklflow it didn't work?

How come you said that the value was visible in the workflow?

regards

Rick Bakker

hanabi technology

Former Member
0 Kudos

Good morning -

As for setting the condition directly in the workflow - if I understand your question correctly - I did use a condition step in the workflow fetching values from containers where I stored data from a form senario. When you use form senario you need to use Form_Field_Name and _Value to move values into the containers.

My error came in forgetting to type the word Form for 3 of my values. I suppose after staring at it for too long I missed the typo, and my partner saw it when doing a review for me.

The value was visible in the workflow because when the step to import the value was executed, it did import the value to the container (which was incorrectly named). I could see the X in there when I was in SWIA - Log - Tech Details - Chron View - Step - Container. However I did NOT see the value in the container where the value was supposed to be moved to. In other words, the workflow picked up the value, but since the mandatory binding definition was incorrect the workflow did not do what it was supposed to do with said value. Thus the condition was failing as the value was not making it to the container that the condition checked.

I hope these details are helpful to you and in your understanding of my issue.

Thank you to everyone who helped.

Former Member
0 Kudos

Hi,

Have you given &containerelement& = 'X' or &containerelement& = X?

Cheers,

Raja.D

Former Member
0 Kudos

The condition editor does not allow me to enter 'X' - when I do, and click the green check, the apostrophes are automatically removed.

So it is written as &containerelement& = X

As a test I changed the condition to be &containerelement& <not equal to> X is true

When I do this and execute the form without checking the box, the workflow proceeds correctly. If I execute the form WITH the box checked - it follows the same path as that without the X.

So - still no go.

This problem seems to be related to accepting &containerelement& = X as true.

former_member185167
Active Contributor
0 Kudos

Hello,

I can only think of a couple of possibilities:

- you are using the wrong &containerlement& (e.g. there are two of similar spelling)

- &containerlement& gets set after the condition tests it

- containerelement is a reserved worked (e.g.&result&)

- containerlement is some strange datatype

I would try creating a new container element, TESTXYZ, type XFELD, copy &containerelement& to it before the condition and test TESTXYZ in the condition instead.

regards

Rick Bakker

hanabi technology

Former Member
0 Kudos

After checking - the container elements are correct and with the checkbox datatype.

The container element is being set before the condition tests it. The first 2 steps import the form fields to the containers.

Tested creating a new container element with said data type, but workflow has the same result.

Also tried a few different conditions using NX EX... not... etc...

I have never set up workflow to read a checkbox before - if you have perhaps you can help...

Thank you.

former_member185167
Active Contributor
0 Kudos

Hello,

It doesn't matter if it's a checkbox, as long as the container element has an 'X' in it you should be able to test it.

Just before the condition, add a step to set &containerlement& = X and see if it works then.

I assume you have gotten conditions to work in other workflows?

Please let us know what the problem was when you finally fix this!

regards

Rick Bakker

hanabi technology

Former Member
0 Kudos

Funny that you mentioned to try that. I had the same thought on the way into work today.

-After trying - that didn't work. I thought I was correct in assuming that container values are available for the duration of the workflow when imported and shouldn't have to be re-imported.

We got it -

It was a typo in the binding.

When working with forms always remind users to check the Form Field binding spellings.

I forgot to put the word Form in Form_Field_value