Checkbox List - Visible/Invisible Widget "Text Input"

149 views
Skip to first unread message

eduar...@gmail.com

unread,
May 3, 2016, 10:15:01 AM5/3/16
to Fujitsu RunMyProcess Developer Community
Hello
I need a help with a checkbox containing a list with 3 values.
I want to make for example 1st value (MESA) the "INPUT" Selection appears.
I would like to put the code in the widget option VISIBLE "TEXT INPUT" try with the code "[[lista]]" == "valor1", but does not work.
I hope you can help me, Thanks
Captura1.JPG
Captura2.JPG
Captura3.JPG
Captura4.JPG

Murali

unread,
May 4, 2016, 1:14:56 AM5/4/16
to Fujitsu RunMyProcess Developer Community, eduar...@gmail.com
Hi Edurado,

Your code and configs are correct; Please verify the JS condition from Test Console, while you test the functionality in test mode.

//alert("[[lista]]" == "valor1");
//alert(id_select.isVisible());

Regards,
Murali

eduar...@gmail.com

unread,
May 4, 2016, 12:35:34 PM5/4/16
to Fujitsu RunMyProcess Developer Community, eduar...@gmail.com
Hi Murali, Thanks for answering

I put the code inside the option VISIBLE in the "select" widget:
"[[List]]" == "value1"
id_select.isVisible ();

but still does not work

Captura5.JPG

Murali

unread,
May 5, 2016, 12:24:44 PM5/5/16
to Fujitsu RunMyProcess Developer Community, eduar...@gmail.com
Hi Eduardo,

In the earlier screenshot "Capture1", you have to check the "Initialize" option and put the Default value(value1) on the Checkbox widget, and include below script in "Visible" option on the Text widget;
as this script validates during the page load.

"[[List]]" == "value1"

If you wanted to make the Text widget visible/invisible based on the selected option of Checkbox box widget,
Please include a JS widget on the WI, which listens to the value variable of Checkbox, i.e 'List' and include below script in it.
Based on the requirement, you could update the IF condition to compare multiple item selections.

function displayTextwidget()
{
//alert("function displayTextwidget");
var selected_val = id_list.getSelectedValue();
var val =JSON.parse(selected_val);
//alert(val);
for(i=0;i<=val.length;i++)
{

 // "value1" is the value of custom list
 if(val[i]=="value1")
 {
    //alert("MESA checked");
    id_select.setVisible(true);
    break;
   }
 else
 {
    alert("MESA unchecked");
    id_select.setVisible(false);
   }
}

}
displayTextwidget();

Hope this helps.

Regards,
Murali
Fujitsu RunMyProcess Support
Message has been deleted

eduar...@gmail.com

unread,
May 9, 2016, 2:05:19 PM5/9/16
to Fujitsu RunMyProcess Developer Community, eduar...@gmail.com
Hi Murali,

It worked perfect.
Thank you very much

Reply all
Reply to author
Forward
0 new messages