What type of field are the values coming from? You mentioned Option 1, Option 2, which makes me think of a checkbox or radio button group, or maybe a dropdown or list box.
For the script, do you just want to display the export value of the selected item, or perform some sort of calculation? The more details you provide about how the fields are set up and what you want to accomplish, the better.
Yes, it's checkboxes and one of the checkboxes has an export value of 0. I want the script to display the export value of the selected item, but when no item is selected, I want there to be a blank display. Right now it's not displaying the 0 export value.
Message was edited by: FBALTD
Ok, the custom calculate script could be:
// Get the checkbox field value
var v = getField("checkbox1").value;
// Set this field value
event.value = v === "Off" ? "" : v;
Replace "checkbox1" with the actual name of the checkbox.
That worked like a charm! I don't know if this next question should be another post or a continuation...
So now I have the answer value for all 5 questions showing the way I want them to. A score was populated based on the checkmark selected for the question. What script can I use that will Total all these answer values together, not show a value when nothing is entered, but show a 0 value if all 5 answer values are zero?
Have you looked at the "Calculate" tab?
You can use the built-in feature "Field is the _____ of the following fields:" to chose the "Sum" operation and then check the fields you want to add.
Thanks, but I still need the Total Field to not show a value when nothing is entered/selected, but show a 0 value if all the answer values are zero?
What should happen if only one or two fields are selected and their values are zero? The total at that time would be zero, but not all items have been selected? In other words, do you want the total to show only if all of the items have a selection, or when at least one item is selected?