neoTableEditColumnAsSelect - Forum

Forum Navigation
You need to log in to create posts and topics.

neoTableEditColumnAsSelect

I have a column dropdown because the foreign key is stored inside the table.

When I load the table, I don't see the value for this field, and When I modify the field the combo show the value and the code.

neoTableEditColumnAsSelect "cJoueur" "4" "inline" "" "" "Honneur|HON\nPromotion|PROMO" "" true ""
neoTableEditColumnAsCheckList "cJoueur" "4" "inline" "" "" "Honneur|HON\nPromotion|PROMO" "" true ""

Quote from Phil78 Slope 2 on November 5, 2026, 7:07 pm

I have a column dropdown because the foreign key is stored inside the table.

When I load the table, I don't see the value for this field, and When I modify the field the combo show the value and the code.

neoTableEditColumnAsSelect "cJoueur" "4" "inline" "" "" "Honneur|HON\nPromotion|PROMO" "" true ""
neoTableEditColumnAsCheckList "cJoueur" "4" "inline" "" "" "Honneur|HON\nPromotion|PROMO" "" true ""

It looks like the dropdown correctly loads the display values when editing, but the table itself doesn't resolve the foreign key into its corresponding label. I would check whether the column is configured to display the descriptive value instead of the stored code. Also, make sure the mapping between the codes (HON, PROMO) and their labels is properly defined when the table loads, not just when the editor opens. This might be a display configuration issue rather than a problem with the foreign key itself.

Hi @stephenbuckley

neoTableSetColumn "cJoueur" 4 "CLASSIFICATION" "Classification" "" false true true ""

$sqlQuerys[5]="SELECT NOM,ACTIF,CLASSIFICATION... from joueur"

the column CLASSIFICATION from table joueur contain the code HON/PROMO...

 

Quote from stephenbuckley on November 12, 2026, 11:01 am
Quote from Phil78 fnaf on November 5, 2026, 7:07 pm

I have a column dropdown because the foreign key is stored inside the table.

When I load the table, I don't see the value for this field, and When I modify the field the combo show the value and the code.

neoTableEditColumnAsSelect "cJoueur" "4" "inline" "" "" "Honneur|HON\nPromotion|PROMO" "" true ""
neoTableEditColumnAsCheckList "cJoueur" "4" "inline" "" "" "Honneur|HON\nPromotion|PROMO" "" true ""

It looks like the dropdown correctly loads the display values when editing, but the table itself doesn't resolve the foreign key into its corresponding label. I would check whether the column is configured to display the descriptive value instead of the stored code. Also, make sure the mapping between the codes (HON, PROMO) and their labels is properly defined when the table loads, not just when the editor opens. This might be a display configuration issue rather than a problem with the foreign key itself.

@stephenbuckley That makes sense regarding the display configuration. Given that @phil78 is pulling CLASSIFICATION directly via $sqlQuerys[5], do you think it's cleaner to handle the code-to-label mapping on the front end via column formatting, or simply map HON/PROMO to Honneur/Promotion directly in the SQL query (using CASE or a lookup JOIN)? I'm curious how neoTableEditColumnAsSelect behaves when saving back if the initial cell holds the label instead of the code.

That doesn't make sense; we might as well not put any code in the database. It doesn't work any better if you enter the list directly into the column. The problem lies with the combo box's code/label decoding mechanism.