How to configure a radio button in Bonita 6?

1
0
-1

Hi,

I would like to create and configure a radio button which choices are "Yes" and "No", but I can't figure out how to store the user choice in a boolean variable and to use it in the next task, nor how to display the "Yes" and "No" options.

The 5.x version documentation didn't help either.

Thank you for your help in advance.

4 answers

1
+2
-1
This one is the BEST answer!

Hi, The default radio-button use a List as Input. In the Data tab of your radio-button widget, you need to set the "available values" with a List that contains 'Yes' and 'No'.

['Yes','No']

You also need to create a variable of type Boolean to store the result. In the Data tab of your radio-button widget, you set the Output operation with the Boolean variable. And on the "takes values of" field, you can use this script :

if (field_RadioButtons.equals('Yes')) return true;
else return false;

Comments

Submitted by amine250 on Mon, 04/13/2015 - 11:09

Thank you for your answer, this helps a lot.

But I'm confused whether the Boolean variable should be declared in the data tab of the task or in the data tab of the whole pool. Since I need to use that boolean variable in the coming gateway, I thought it should be declared in the pool data tab. So it keeps showing me this 1

before I could go to my actual form which is like this: 2

Is there any way I can avoid the displaying of the first form? Thank you

Submitted by yannick.lombardi on Mon, 04/13/2015 - 11:28

If you need to use the variable in another task/gateway, the variable need to be in the Process.

To skip the first form, click on your the starting Lane of your process, then in the Application tab / Pageflow, check the "Skip" box.

Submitted by yannick.lombardi on Mon, 04/13/2015 - 11:28

If you need to use the variable in another task/gateway, the variable need to be in the Process.

To skip the first form, click on your the starting Lane of your process, then in the Application tab / Pageflow, check the "Skip" box.

Submitted by amine250 on Mon, 04/13/2015 - 11:33

Thank you :) Everything is working good

1
0
-1

Hi to all,

I'm using Bonita 7.1.3 with Windows 7.

I want to use Radio Buttons with "Yes", "No" like you say with UI Designer. I have my form in a task with the Radio Buttons, but I have problems:

1.- When I execute the work flow and get the form, the Radio Button don't works. Both are disabled and don't change on click ( I'm sure I need to configurate something at UI Designer, but I don't know what )

2.- I don't know how take the value ( boolean: true with "Yes" and false with "No" ) to my BDM object which has a boolean attribute.

The Radio Button has any name like for example the swing components in Java to be able to use its attributes ?. something like: componentName.getValue().

Help please.

Thanks and regards.

Comments

Submitted by gael.tarot on Wed, 03/23/2016 - 15:23

Same problem here...
I can't bind a Boolean to radio buttons with Bonita 7.X forms...

The only way I found is create a String in contract, and if String value is Yes, I set "true" to the Boolean in Operations. But that's not really clean!

Submitted by juanpablo.garciasaez on Wed, 03/23/2016 - 16:03

I have other way, I use a checkbox: Yes ( checked ) NO ( unckecked )

1.- In Contract, one boolean variable.
2.- In UI, in Value of the check box: input.boolean_variable
3.- In Operations: object_bdm -- setAttribute -- boolean_variable ( will load true or false ).

Submitted by gael.tarot on Wed, 03/23/2016 - 16:47

Thanks for your help,
it can be done like that, but I would like to have Radio Buttons (with that I can add a little explain sentence for Yes and No).
In additions, specifications are asking for Radio Buttons :(
So for now, I'm using a Text Field with Yes or No...

1
0
-1

Error Incorrect zip structure to import Ui Designer, Please Help!

1
-1
-1
Notifications