[ad_1]
Hello @eberkland
Assuming you have the fieldname1, with two choices, fruits and vegetables, and the checkbox field fieldname2 with the choices bananas, strawberries, carrots, and lettuce. If the user selects fruits in fieldname1 you want to tick the bananas, strawberries choices in fieldname2, carrots, and lettuce choices if the user selects vegetables.
You can insert a calculated field in the form to be used as an auxiliary (you can hide it by ticking a checkbox in its settings), and enter the equation:
getField(fieldname2|n).setVal(IF(fieldname1=='fruits', ['bananas', 'strawberries'], ['carrots', 'lettuce']))
Or if you prefer to implement the equation with function structure:
(function()
if(fieldname1=='fruits')n).setVal(['bananas', 'strawberries']);
else n).setVal(['carrots', 'lettuce']);
)()
Best regards.