distal-attribute
distal-attribute
distal-attribute
distal-attribute

Foreign key drop down menu

heraldic2 posted 3 years ago in General
Greetings,

I love HeidiSQL, I was just wondering if there is a way to change the order in a foreign key drop down menu.

An example:
table1 has three columns (id1, first_name, date)
table2 has the columns (id2, id1, info) Foreign Key table1.id1 = table2.id2

When filling in table2 information you use table2.id1 as a drop down. This drop down has 2 columns listed. id1 and first_name. This is done so you know what id1 is, however it is ordered by first_name.

Is there any way to set the order by to id1 instead of first_name, and still see first_name?

Thank you for your time
ansgar posted 3 years ago
No, that's some hardcoded part in HeidiSQL which guesses about what the user wants to have displayed in that drop down.
heraldic2 posted 3 years ago
Thank you very much for the reply anse
vr6racer posted 2 months ago
hi, sorry to revive such an old post, but have the same problem as Heraldic2.

is this still hard coded?
couldn't this be a feature?

Like now, is useful in some tables, but in others gets all messed up.
the best way, was if heidisql permits the user to edit that sql's SELECT and store it for each table.

thank you for your excellent work
ansgar posted 2 months ago
What HeidiSQL displays is not really hardcoded. It's the content of the very first varchar or text column in the foreign table. There is no way for the user to change that behaviour currently, unless you move the wanted varchar/text column in the table structure so it's the first one.

Please login to leave a reply, or register at first.