HiI am using version 2020
I have generated a needed code and customized it manually to meet my needs. But I have made a mistake in setting of lookup . As you see down I have chosen the Field Lang__en as a lookup field from table texty__lang. The right one should be Lang__de not Lang__en. If I change it in the project I need to generate code again and customize it again what it needs much more time.If I change Lang__en to Lang__de in code bellow, it does not work and gives mi LangID insteed of Lang__de
Could you please take a look and give mi info where I have to change a code too? In which file(s) ?
Thanks// Languages
$this->Languages = new DbField(‘userdata’, ‘userdata’, ‘x_Languages’, ‘Languages’, ‘Languages’, ‘Languages’, 200, 250, -1, FALSE, ‘Languages’, FALSE, FALSE, FALSE, ‘FORMATTED TEXT’, ‘CHECKBOX’);
$this->Languages->Sortable = TRUE; // Allow sort
switch ($CurrentLanguage) {
case “en”:
$this->Languages->Lookup = new Lookup(‘Languages’, ‘textylang’, FALSE, ‘LangID’, [“Langen”,“”,“”,“”], , , , , , , ‘Lang__en ASC’, ‘’);
break;
default:
$this->Languages->Lookup = new Lookup(‘Languages’, ‘textylang’, FALSE, ‘LangID’, [“Langen”,“”,“”,“”], , , , , , , ‘Lang__en ASC’, ‘’);
break;
}
$this->fields[‘Languages’] = &$this->Languages;
You better generate again, there are more than one places that use the field name. You may correct your setup and generate another version, then you can compare the code.