Actions based on visibility

Update:
Changing the below question to a feature request.
In a nutshell: allowing us to set action based on visibility changes, i.e. what happens when a components becomes visible, or when it becomes hidden.
Thanks


Hi all,
I’ve read quite a few posts about the interactions between choice components and their visibility setting.
My question is focused on the choice fields which are hidden due to visibility configuration, all within a custom form.

Here’s an example:
First field/question - what is your age?

Second field/question - do you have a drivers license?
This question is visible only if you input an age higher than X.

The problem:
Assuming a user (by mistake, or not) inputted (or selected if pre-defined) an age higher than X and than answered question no.2.
Now the user realized they made a mistake with their age and change it to something lower than X. The second question indeed disappears from the screen, but the answer still remains. This answer might be used for other elements on the screen and/or post-submission processes.

The question:
Is there a question to reset this fields once it’s hidden again?
Let’s assume the value in this field was cleared when user pressed the button to enter the form in the first place. This means a “field reset” is actually a “clear value” action. If field has been pre-filled with any value (other than “clear”), I can assume it’ll be quite challenging to go back to this value once hidden.

I know that we can solve this with ITE columns and other workarounds, but was wondering if there’s a more elegant solution.
ITE and similar solutions try to overcome a situation in which we have irregular answers (such as a 10 years old with a drivers license). It forces us to predict and defuse any such situation. This can very easily turn into a headache, not to mention that it opens a door to irregularities we didn’t foresee. I’d like to know if we can avoid these irregularities altogether.

Thanks

A easy work around could be two buttons

  1. Edit Age
  2. Confirm Age

On Confirm age you can clear the value!
Second field now gets one more visibility condition of the first field being confirmed!
A simple boolean variable should do the trick!

Thanks, but that’s exactly the kind of workaround I’m trying to avoid.
This was a (VERY) simple example. I’m sure you’re aware our actual scenarios are much more complicated. Sure, we can build workaround and they are not very complicated in their execution. What I’m trying to avoid is the need for such workarounds, and the added-value that comes with knowing you haven’t missed any problematic outcomes.

This could be a feature request to provide action on choice component!

This is a valid concern. I usually face this when I let users fill a form with 2 or even more “types of data” inside it. Usually I have to do a set column > clear values to clear all the “incorrect” values to keep the data clean. Having a native solution would be much nicer.

This is with a dedicated button?
Our users expect a clean and easy interface. “Force-feeding” the app by clearing values is counterintuitive to 85% of the users. This means the solution isn’t something we can rely on, so it’s not really a solution.
The app needs to do its own housekeeping to maintain date integrity.

No, this is in a form environment and that action is an “on submit” action.