This conversation has been locked due to inactivity. Please create a new post.
This conversation has been locked due to inactivity. Please create a new post.
Hello everyone. First, let me say many thanks to all of the users as well as admins in this forum. As a novice LiveCycle user, I have learned an incredible amount from searching on the forum and reading from others. Now, on to my current question......
I am using a custom form created in LiveCycle ES 8.2, and am wondering how to empower a checkbox to automatically fill in (ie. "on") based on a number inputted into a Numerical Field using a range criteria. To be more specific, I have (5) checkboxes that will be labeled as follows:
Name: CheckBox1 < 500
Name: CheckBox2 500 - 999
Name: CheckBox3 1,000 - 1,499
Name: CheckBox4 > 1,500
Name: Checkbox5 None
I want ONLY ONE checkbox to auto fill in based upon a number that I enter into the Numerical Field (called "NumericField1"). For example, if I enter the number "889", I only want CheckBox2 to auto fill in. Unsure what script to use in the Script Editor for this. Any help would greatly be appreciated. Thanks so much in advance.
MJ
Solved! Go to Solution.
Views
Replies
Total Likes
You're welcome. I added a second numeric field. nf1 is user-entered optional. nf2 is calculated read-only field to mimic your form. nf2 simply takes the value of nf1. I moved the radio button logic to the calculate event of the radio button exclusion group to produce the results below. I think that is what you are after. The updated form is attached.
Steve
Views
Replies
Total Likes
Is this what you are after? I used a radio button exclusion group rather than check boxes, although I made the radio buttons appear like check boxes.
Steve
Steve, thanks so much for the reply recommendation. Yes, your recommendation worked well in performing the task I wanted.....but, unfortunately it is preventing another script that I had wanted to implement as well. I am sure that there is a way to do both, but I don't know how to script it. Here it goes:
the numerical field that is controlling the radio buttons iteself needs to be calculated by values which i input into other numerical fields. Basically, I need the numerical field (which you have named "nf") to be calculated via the following script:
nf.rawValue = (29.7) * DropDownList5.rawValue * DropDownList5.rawValue * NumericField5.rawValue * DropDownList13.rawValue
I am attaching both a copy of the form as well as a sample of what the completed product looks like.
To re-iterate, I need the Field called "nf" to be calculated based on values pulled from the fields mentioned above in the formula, and I need that finished product value to control the radio boxes as you have already done.
FYI, if it would be easier for scripting purposes, the above script is for this:
GPM Flowed = (29.7) * (Orifice Flowed)squared * square root(Flow Pressure) * (Nozzle Coefficient)
Thanks again for taking the time to script exactly what I was needing for the radio buttons.
http://kmphydrants.com/downloads/Hydrant%20Inspection%20Form.pdf
http://kmphydrants.com/downloads/Hydrant%20Inspection%20Sample%20Form.pdf
Views
Replies
Total Likes
You're welcome. I added a second numeric field. nf1 is user-entered optional. nf2 is calculated read-only field to mimic your form. nf2 simply takes the value of nf1. I moved the radio button logic to the calculate event of the radio button exclusion group to produce the results below. I think that is what you are after. The updated form is attached.
Steve
Views
Replies
Total Likes
Worked great sir! Thanks again for your assistance.
Matt
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies