18.07.2011, 01:48 | #1 |
Участник
|
How to overwrite a display value of the edit field
Hi all.
I have the following problem: I have 2 data tables which represent the relation between the customers and the bonus codes. Table A BonusCode | recId Table B AccountNum | ArticleNum | TableARecId (as key) Now I am trying to create a form containing the grid with the AccountNum, ArticleNum and the BonusCode. The BonusCode field should have a lookup function to the data in the Table A. When I get the value of the BonusCode with the display method I must create my own lookup method from zero to have the possibility to choose the data. Could I instead include the TableARecId in the grid as the edit field and overwrite the show method to show the value of the bonus code??? |
|
26.07.2011, 07:54 | #2 |
Мрачный тип
|
Цитата:
You may use edit-method on TableB datasource for displaying and editing BonusCode on the grid. X++: edit <BonusCodeType> BonusCodeValue(boolean set, TableB record, str Id) { if(set) record.TableARecId = str2int64(id); return (select BonusCode from TableA where TableA.RecId == record.TableARecId).BonusCode; }
__________________
Мы летаем, кружимся, нагоняем ужасы ... |
|
Теги |
edit field, lookup, overwrite display value |
|
|