Quantcast
Channel: NAV Three Tier — mibuso.com
Viewing all articles
Browse latest Browse all 10032

Update a field on table from multiple fields from another table using a condition?

$
0
0
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;

Viewing all articles
Browse latest Browse all 10032

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>