Answered
My current form is being used to inspect manufactured goods in a factory.
An Inspector uses the form to track items to check.
So, when they are told to look at cracks, there is a Yes/No check box (radio button) they would select. If they select yes, I also want a qty found entered. If they check no, the qty field should be locked .....
Can I use the value from the Y/N radio button to change the input parameter of a number field?
No in the radio button would make the qty field "read only"
Yes in the radio button would make the qty field "user input required"
Thanks,
Yokie
Yes this is possible, but will involve some script.
I would recommend that you place the script in the click event of the radio button exclusion group and not in the individual radio buttons.
First select the radio button group and go to the Object > Binding palette. Check what the specified values are for the Yes (I will assume 1) and for the No (I will assume 2).Then the following should work in the click event:
if (this.rawValue == 1)
{
quantity.access = "open";
quantity.mandatory = "error";
}
else
{
quantity.mandatory = "disabled";
quantity.access = "readOnly";
}
You could also hide the quantity field.
The last thing to consider is what is the default state for the quantity object (open & required OR readOnly & optional). You can set this at design time in LC Designer.
Hope this helps,
Niall
Assure Dynamics