I have a form field set as “Select type” where the value of the field disappears from the screen after an update.
I traced the value of the field on each event and function. What I discovered is the following:
Scriptcase gets confused between “form fields” and “local variables” when the names are exactly the same except for the curly breckets and the dollar sign ($). in my case:
My form field was : {education}
My local variable was : $education
How I fixed this was I changed the name of my local variable from $education to $educationx.
I don’t believe this is normal behavior but thought someone might benefit from this info.
I’ve found out about this local var and field names confusion some time ago.
I suspect it is “normal” SC behavior.
Now I always avoid using the same name for variables in code and field names by adding a prefix to the variables.
Eg:
$v_fieldname = {fieldname};
Hello, @robydago
Yes, this behavior might happen if you use a local variable and a form field with the same name.
We strongly recommend you to not do that, in order to avoid these conflicts.
If that’s the case, is it written anywhere in the documentation?
If not, it should be documented, because find it the hard way is very frustrating.