Select Single - Table Existing Data

Hardus

Member
HI,

I have a table with existing data in a field, to make it easier for future insertions I want to add a "Select_Single" as a dropdown box, problem is the existing data is not shown and only the dropdown box in edit mode, I even selected the "Other choices allowed" checkbox.

How can I make the new dropdown options co-exist with the old data without having to re-enter all the data again?


[pre]
You are using DaDaBIK version 9.2-Monterosso enterprise, installed on 11-15-2018 (installation code: 140855bc739c14ccd4), the latest version of DaDaBIK is 9.2-Monterosso released on 11-07-2018

You are runnning the last release of DaDaBIK

PHP Version: 7.2.10-0ubuntu0.18.04.1

mysql version: 5.7.24-0ubuntu0.18.04.1

Web server: Apache/2.4.29 (Ubuntu)

Client: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36
[/pre]
 

eugenio

Administrator
Staff member
Hello,
If the field has values that don't appear in the linked table (or in the hard-coded values), they won't show up. There is also a risk: if users save the form, your old value will be overwritten with an empty string (which is the option selected if the linked table/hardcoded list doesn't contain the current value).

What you should do is to add the current values to the linked table (or if it's not a lookup table, to the list of hard-coded options).

The "Other choices allowed" option only allows the FINAL USER to specify an additional option while using the listbox.

Best,
 

Hardus

Member
I did add the options to the lookup table, still the same.

Old Way:
image.png


With a Lookup Table
image.png


Here is some of my lookup table's data ( I Have 45 Entries in total ):
image.png
 

eugenio

Administrator
Staff member
Hello,
I think the problem is not clear to me: is agentidocuser the field we are talking about?
If yes, it seems it was a textbox (old way) not a select_single.
 

Hardus

Member
Yes, it was a text box, But I already have data in all the old fields, I want to change to select single without losing the entered data, I made the select single data the same as the data already in the DB.
 

eugenio

Administrator
Staff member
Ok, maybe the problem is that your old values are the linked fields; what is used to match the record in the external table is ididocs (primary key of the table I guess).

Best,
 
Top