Auto populate a lookup field with data from that field

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
theyland
Posts: 12
Joined: 2020-11-04 15:43

Auto populate a lookup field with data from that field

Post by theyland » 2020-11-05 08:39

Hello, I am new to AppGini and still trying to grasp the lookup fields. I have a table called "SPR" with the field "Project" where the project number for the orders are stored. I would like to have a drop down list for the Project field which is populated with the Project numbers from that same field.
In phpmyadmin this works
SELECT `spr`.`Project` FROM `spr` Group by `spr`.`Project` order by `spr`.`Project`
but in AppGini I get an error message.
I then tried to make a field Projectdummy which is populated with the data from Project through a calculated field. I then tried running the following Query in the Lookupfield of Project:
SELECT `spr`.`Projectdummy` FROM `spr` Group by `spr`.`Projectdummy` order by `spr`.`Projectdummy`.
This just gives me an empty drop down list and Project data is not displayed in the table.
Tanks for any suggestions

Post Reply