Removing a value entered in a single line control when a Yes/No control is checked or unchecked


Badge +3

I have a supply order form I am setting up. I have a set of items that go together and they are at the top of the form. Next to each item(which is just a label control) is a Yes/No checkbox control. When the user click the box, a panel with the items available in that group becomes visible, being set with a formatting "Hide" rule for the panel. Once the panel is visible then the user can add quantities of items in a single line control box set to integer and a formula control totals the amount and puts into a formula field. At the bottom of the form is a Total Order formula field that adds all of these formulas together for a cost for everything ordered. Here is the problem:

If a user chooses a checkbox at the top and the items appears and they fill in a quantity, then decide they did not want to order any of that item, they can of course remove the check next to the item and the top and the panel disappears. However, the item does remain, just hidden. This means that although the item isn't visible on the form in any view, the amount remains in the formulas because the quantity single line control retains the value entered when the item was visible. The user may literally have a blank order form when finished with an amount of money for purchases not shown.

What I am looking for is a way to remove the value in the quantity single line control if the Yes/No control associated at the top with hiding via a formatting rule is unchecked so that amount is removed or set to zero.


11 replies

Badge +16

Can you have your formula calculate based on the checkboxes?

For example below, expression = item1price + item2price only when both are ticked.

CalculateTotal.PNG

Badge +3

Thanks for your response, would you place the calculation on the Yes/No control? Or on the Single Text control where they put in the quantity?

Badge +16

I had that calculation on my "total" field.

Badge +3

Thanks I will test that

"La familia siempre viene primero"

Loyal Anderson

Badge +3

Thanks

Badge +16

Have you resolved the issue?

Badge +3

resolved

Badge +16

excellent happy.png can you mark the answer as correct then please?

Badge +3

I don’t have that option under Actions, is it somewhere else?

Badge +16

On any of the responses you should be able to "correct answer" or something like that x

Badge +3

Done

Reply