Hi guys.
Lets say I need to fill a field "Values" on Table1 to be like this:
"Values" = Text1 + Text2 + Text3 + ... + TextN.
Where Text1...etc are fields in another table, Table2.
Table1 and Table2 have one common field, lets call it "Key" where there can be same values of this field in both tables.
How and where should I put a code for this.
I tried to place this code OnAfterGetRecord trigger of Table1 but it doesn't work
Table2.SETRANGE ("Key","Key");
Values :=' ';
IF Table2.FIND ('-') THEN
REPEAT
Values := Table2.Text1 + ' ' + Table2.Text2 + ' ' + Table2.Text3;
UNTIL
Table2.NEXT = 0;
Lets say I need to fill a field "Values" on Table1 to be like this:
"Values" = Text1 + Text2 + Text3 + ... + TextN.
Where Text1...etc are fields in another table, Table2.
Table1 and Table2 have one common field, lets call it "Key" where there can be same values of this field in both tables.
How and where should I put a code for this.
I tried to place this code OnAfterGetRecord trigger of Table1 but it doesn't work
Table2.SETRANGE ("Key","Key");
Values :=' ';
IF Table2.FIND ('-') THEN
REPEAT
Values := Table2.Text1 + ' ' + Table2.Text2 + ' ' + Table2.Text3;
UNTIL
Table2.NEXT = 0;