Single_select using table values: I would like to know how to default to the first table result from the table and display it like you do.

D

New member
1671559152173.png

Your current DaDaBIK version​

You are using DaDaBIK version 11.8-Elba enterprise, installed on 12-09-2022 (installation code: 18442637ee4274312a), the latest version of DaDaBIK is 11.8-Elba released on 12-05-2022
You are running the latest release of DaDaBIK
In case you want to upgrade to a more powerful edition (from Pro to Enterprise/Platinum, from Enterprise to Platinum) please contact us.

System info​

PHP Version: 7.4.33
sqlserver version: 16.00.0900
Web server: Microsoft-IIS/10.0
Client: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36 Edg/108.0.1462.54
URL installation: https://smallbizpc.com/program_files/
 

D

New member
I have lots of single select boxes based on table values, and when they display on the forms, the boxes are blank until the user selects a value.
I would like to make the first value in the table list of the box be defaulted in the list boxes visible area so we can see the value without clicking on the list, as the first value is often the one the user wants. So the list boxes would look like the list boxes you present when we create our table fields. Where NO is the default value.

Thanks
 

eugenio

Administrator
Staff member
For select_single lookup fields, In form configurator you can choose the default value, even through an SQL query or through a custom function.

Best,
 

D

New member
I am not sure I understand. I can place a yes or no, or even an id number in the default field. Since I need the first record in the records returned from the database to be in the default, but still allow the user to choose an alternate if they do not want the one I chose for them. If this requires me to make a function, can you point me to an example?

Thanks so much for your help.
 
Top