Can an expression clear a dropdown value if the referring checkbox is unselected? | Community
Skip to main content
Lyndsy-Denk
Community Advisor
Community Advisor
November 26, 2024
Question

Can an expression clear a dropdown value if the referring checkbox is unselected?

  • November 26, 2024
  • 1 reply
  • 693 views

I'm building a custom form that starts with a checkbox field. Upon selecting an item, it shows a single-select dropdown listing numbers. Then I have a calculation that says, "Sum the value of all those number dropdowns." However, if you deselect an item in the checkbox, it doesn't clear the dropdown value and the calculation is therefore inaccurate. I'm thinking there are two possible workarounds, but I'm struggling to take my thinking further:

  1. Write an expression to clear the dropdown value if the checkbox is deselected.
  2. In my SUM expression, only sum if the checkbox is also selected.

I'd prefer option 1, but I suspect option 2 is more feasible. What do you think?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

skyehansen
Community Advisor and Adobe Champion
November 26, 2024

option 2 all the way, as well as figuring out other risks of having a hidden, selected dropdown field.

Lyndsy-Denk
Community Advisor
Community Advisor
December 2, 2024

Thank you for validating. Now I have to figure out the if statements, which make my head spin.

skyehansen
Community Advisor and Adobe Champion
December 2, 2024

have you tried chatGPT? If you give it a sample of a simple IF statement, I bet you can get it to help you on something more difficult.