Lookup tables referenced by index keys?

donworth

Member
Hello,
I just purchased dadaBIK and am impressed! I have the following question...

I have an area_deaths database the contains information about deaths in Ventura County. It has 80,000 rows and I imported it into the dataBIK database from another database. I have a field in area_deaths that has the index of a row in another table called locations which lists all the possible locations someone might have died. So...

area_deaths
ID
name
location (contains 17, say) -----> locations
ID
location

17th row in locations.location is "Oxnard"

I am able to set up dadaBIK to constrain data entry to use one of the locations in the locations table. But when a location is selected I want the index of the row in the locations table to go into the area_deaths location field and have the string "Oxnard" appear in the grid and details pages.

Is that possible somehow? Or am I worrying too much about saving space in the database by using an ID instead of just letting dadaBIK fill in a text field in area_deaths?

Thanks for any help you can offer me!

Don



Your current DaDaBIK version

You are using DaDaBIK version 10.4-Manarola pro, installed on 12-26-2020 (installation code: 163965fe831cbbb99e), the latest version of DaDaBIK is 10.4-Manarola released on 12-10-2020

You are runnning the last release of DaDaBIK

In case you want to upgrade to a more powerful edition (from Pro to Enterprise/Platinum, from Enteprise to Platinum) please contact us.

System info

PHP Version: 7.2.34

mysql version: 5.5.62-cll-lve

Web server: Apache

Client: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.2 Safari/605.1.15

URL installation: https://48ovvi.org/dadabik/
 

eugenio

Administrator
Staff member
Hello,
not sure if I have understood what happened but yes, the lookup field contains an "ID" and refers to another table. The field you have to use to refer to the linked table is the primary key (not a generic unique index) of such table.

Best,
 

donworth

Member
Thanks for responding, Eugenio. I think I may have been confused about how to set up the form initially and was trying to use the details table and key parameters instead of the appropriate ones. When I changed to the correct way at first it didn't replace the numbers (foreign key) with strings. But when I checked later it did replace them correctly. Sorry to have troubled you about it!
 
Top