I have a form that I am getting users to input data into - There are some options that would not need to be shown on the screen unless a value or selction is made on another data box on the same form.
I want to know how to I make a drop down or a text box toggle between visible and invisible based on the no selection label being something other than std - triggering a new part of the form to become visible.
I am using Vision
I recommend binding to the dropdown’s selectedIndex
property. It will be -1 when nothing is selected. (An expression binding on the visible
property of the target field.)
2 Likes
That worked perfect - However…(theres always a however!) I have now bound the Visible property value to the drop down selected index & this is -1 when there is nothing selected … but this makes the object invisible when there is a selection and visible when the value is -1 ( is there a way I can reverse the behaviour of the visible property?
Use an expression binding, not a simple property binding. In the expression, use the !=
comparison.
Note: if you use a simple property binding from a number to a boolean, zero yields false, and non-zero yields true. If you tested further, you would have found that selecting beyond the first row would also have made your field visible.
All records in my drop down =0 except for the non selected value this is -1
my drop down is linked to a SQL table to show the data.
I’m not too sure how to write the expression you mentioned… I keep getting an error message
Use selectedIndex
, not selectedValue
.
{Root Container.path.to.dropdown.selectedIndex} != -1