Dynamic Field Defaults
This is complicated to explain but I will try. I need some fields to default to a selection or number but when that field is changed I need it to stay changed even if you exit and re-enter the form.
Currently I base it on another field that I know has to be selected. example: if (a different field < -1) {default} else {current field}. However, that isn't the best way in case that field gets deselected it can reset a bunch of fields to the default even after they were changed.
I want it to be: on original generation of form {default} else {keep any changes made}
if you just put {default} in the dynamic value without any if/then statement when it gets changed from the default and then you exit the form and go back in, even if you save it, it goes back to the default. This is causing some problems with other fields because of dependencies. I do a lot of show/hide on my forms to try and make them more user friendly.
I'm relying on the user to not make a mistake and deselect a field and as we know that is not the best plan.
It is quite possible this already exists and I just haven't figured out how to make it foolproof.
-
I agree! This has been problematic for my forms as well. When we set fields to a default based on a lookup table and the user changes that default, if they exit the form and come back in, it reverts back to the default. We need to know if there is a solution that exists for this we are unaware of, or if you could create one.
-
Hi Lea, Steve, Danny,
Apologies for not getting back to you sooner. I put together a form package with a workaround that will fix the issue Lea mentioned. Please download the form package, import it into your profile and play around. The parent form name is "dynamic_value_parent" and I included two scenarios in the form. The Success one is what you wanted to achieve. Let me know if you have any questions.
Link to the form package: https://drive.google.com/file/d/1L_lmdTsTD9sZVS3goIhVRUF3Vi_aY6jV/view?usp=sharing
-
Hi Penny,
I'm having the same sort of problem as Lea. I played around with the above package you developed, and while it works fine for single-page subforms, when I changed it to a multi-page subform (which is what we exclusively use), it does not work. For a multi-page subform, if a non-default entry is made in the first subform, that entry becomes the new default for subsequent subforms. How would one create an efficient default/changes made situation in a multi-page subform field, that is independent of entries in any other subform?
Please sign in to leave a comment.
Comments
4 comments