This is a more complex issue that has multiple solutions.
There are two ways to make the checkboxes mutually exclusive.
1) give them all the same name and different export values. This is the easy method
2) write a script that actively maintains the mutual exclusion. This is more difficult.
You also have two other problems,
1) Mapping the check boxes to the related text field.
2) Managing the values in the text fields.
You've indicated that currently both of these items are managed with individual calculation scripts. This works when the checkboxes have different names. But the scripts would need to be changed if the checkboxes were renamed to make them mutually exclusive, which is the better method.
If I was designing this from scratch, I would have either used group names for the checkboxes that had a matching component for the text field name, or made them all the same name and used the export value to indicate the related text field. I would also have written a single document level calculation function that would work for all of the related text fields.
But given what you already have it's probably easier to write a function for managing the mutual exclusion of the check boxes.
Here's a document level function that is called from the MouseUp of every checkbox.
function MakeExclusive()
{
if(event.target.value != "Off")
{ // Only necessary when click field is checked, not unchecked
var aChkFlds = ["CheckBoxA","CheckBoxB","CheckBoxC","CheckBoxD"];
aChkFlds.map(a=>this.getField(a)).forEach(function(oFld){if((oFld != event.target) && (oFld.value != "Off")) oFld.value = "Off";});
}
}
10 million Thanks, Worked like a Charm....AGAIN!!!! 8 Mutually exclusive text box's, for a novice its a thing to behold (I'm jumping up and down and the kids just don't get it)
And here it is for the PERFECTLY MUTUALLY EXCLUSIVE CHECKBOX. After you add the Checkbox and it's corresponding Textbox, the below code is added to each Textbox lineitem associated with a Checkbox.
Each Textbox associated with a checkbox has the code:
if (this.getField("CheckBoxA").value != "Off") {
// box is checked
event.value = 25110 ;
} else {
// box is unchecked
event.value = "" ;
THEN: Adding the MouseUp Java Scrip (for my specific situation):
{
if(event.target.value != "Off")
var aChkFlds = ["CheckBoxA","CheckBoxB","CheckBoxC","CheckBoxD","CheckBoxE","CheckBoxF", "CheckBoxG", "CheckBoxH"];
aChkFlds.map(a=>this.getField(a)).forEach(function(oFld){if((oFld != event.target) && (oFld.value != "Off")) oFld.value = "Off";});
}