I have a table named employees that has a field named dept. I set the employees.dept field to link with the departments.name field. Instead of showing the department name it is showing the department.id field data. I hope this is clear enough for you guys to help.
Employees:
id
name
dept
Department:
id
name
Thanks,TD
Lookup field shows data from another field
Re: Lookup field shows data from another field
In employees.dept double check lookup options. Especially check value of caption 1.
Can you please upload a screenshot of the field settings of employees.dept
Note that the primary key (id) will be stored in database. The field(s) you define as caption are just for display. The primary key defines the relation between those two records.
I recommend naming such lookup fields dept_id which gives more flexibility for future autofill fields like dept_description etc.. but this is just my personal opinion and experience.
Can you please upload a screenshot of the field settings of employees.dept
Note that the primary key (id) will be stored in database. The field(s) you define as caption are just for display. The primary key defines the relation between those two records.
I recommend naming such lookup fields dept_id which gives more flexibility for future autofill fields like dept_description etc.. but this is just my personal opinion and experience.
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: Lookup field shows data from another field
Thank you jsetzer for helping. This is my first full app I have built with Appgini so I probably have something wrong. The attached screen capture shows how I have things configured in Appgini. Please review and advise on how to properly link tables within Appgini
TD
https://adsi-sc.com/accommodations/imag ... apture.jpg
TD
https://adsi-sc.com/accommodations/imag ... apture.jpg
Re: Lookup field shows data from another field
Everything looks fine. Did you re-generate all files and upload all necessary files to your webserver?
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
[code]...[/code]
blocks for better readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: Lookup field shows data from another field
Hi jsetzer, I just finished uploading everything to the web server. I have tried everything I know to do including deleting the employees table in Appgini and then recreating it again; same issue. This is the only place in the app where this occurs so I have decided for now to just live with it although I might ask tech support to look at it. Anyways, thank you for your help!
TD
TD
Re: Lookup field shows data from another field
Hi,
A shot in the dark:
Is there anything funny in the Advanced section for the employees.dept lookup field? It should be something like
~Paul
A shot in the dark:
Is there anything funny in the Advanced section for the employees.dept lookup field? It should be something like
Code: Select all
SELECT `departments`.`id`, `departments`.`name` FROM `departments` ORDER BY 2
Re: Lookup field shows data from another field
I just checked the Advanced section for employees.dept and it had exactly the same thing you posted so no joy there, but thanks for trying to help
TD
TD
Re: Lookup field shows data from another field
Hi,
just a short question. Is this a single lookup you are using, or is this somehow a nested lookup? There is an issue with nested lookup not showing the data, but the id.
just a short question. Is this a single lookup you are using, or is this somehow a nested lookup? There is an issue with nested lookup not showing the data, but the id.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.