Inconsistent Default Field.

debbieae

New member
DaDaBIK version 11.10
PHP Version: 8.1.18
mysql version: 5.7.43

I have several forms that have a single select field based off the same data. I have set this field to have a default value of 0 in all the instances where it exists, but sometimes the default value will not "take". Most tables the default works perfectly, but a few will not use the default field at all. I have done a work around by setting the default in a SQL statement that yields the 0, but that often does not save the value, so an after insert is needed to get it to work correctly.

Are there any known issues that might cause this odd behavior? I would prefer this work by default and not need to rely on these work arounds.

In addition, (this may be related and may not), I have a master details view that has stopped adding the master record ID when adding the detail record.

Please let me know what relevant details I can provide that may help to diagnose these odd issues.
 

eugenio

Administrator
Staff member
Hello,
about the master details problem, please start a different thread, I don't think it is related.
About the default field issue, I am not aware of any bug, when you say will not "take" do you mean the value is not selected when you open the insert form? Which value is selected instead?
 

debbieae

New member
The field is blank when I open the form or in the previews. I have the default value set and the drop down is working as expected, there is just no default. Interestingly, it saves with a null despite this being a required field too.
 

eugenio

Administrator
Staff member
Did you check if the default value you set in form configurator is actually one of the option available in the dropdown menu?
 

debbieae

New member
Yes, it is a drop down that I use frequently and the options are 1 and 0. Nearly always my default is 0 and it works in other tables.
 

eugenio

Administrator
Staff member
So the options are just 0 and 1, you set 0 as default but when you open the insert form the selected option is blank?
Is the application publicly accessible?
 

debbieae

New member
We have very limited access, but if you need access, I can arrange with my ops person to allow your address to access.
 

eugenio

Administrator
Staff member
Let's start with some screenshots then. Could you post these screenshots?

1) Form configurator, default value parameter
2) Insert form when you open it
3) Insert form when you click on the field (to see all the available options)
 
Top