I have a container in which I am using combination="or" inside that I have 2 containers. Each container has 3 items <select><browser><text>Based on what the user selects on <select><option/> I want to display the correct item which is either Browser or text. I am able to do alert on select which brings up the correct value from <select> <option/> in my function, but trying to setVisible(false) fails when I try to do var persValue = item.getOptions()[item.getValue()].value;alert(persValue);IWDatacapture.getItem("/root/Text/Links/Local/browser").setVisible(false);IWDatacapture.getItem("/root/Text/Links/Local/text").setVisible(false);if(selectOption == "K"){ IWDatacapture.getItem("/root/Text/Links/Local/text").setVisible(true);}else{ IWDatacapture.getItem("/root/Text/Links/Local/browser").setVisible(false);}Am I doing this correctly? or do I need to do something in addition to this to make this happen? NOTE: Links is a container and Local is a container as well and inside Links I have 2 containers. Local and Global.
var persValue = item.getOptions()[item.getValue()].value;alert(persValue);IWDatacapture.getItem("/root/Text/Links/Local/browser").setVisible(false);IWDatacapture.getItem("/root/Text/Links/Local/text").setVisible(false);if(selectOption == "K"){ IWDatacapture.getItem("/root/Text/Links/Local/text").setVisible(true);}else{ IWDatacapture.getItem("/root/Text/Links/Local/browser").setVisible(false);}
I am not trying to setvisible on the first item. I tried putting the setvisible true and false around my condition just like suggested earlier still same thing. Any help.