Hello,
I need to fill a temp. table with lots of fields gathered from a few tables.
I´m talking about 40 fields.
I guess my code will look like:
field1 := table1.field1;
field2 := table1.field2;
field3 := table1.field3;
field 4 := table2.field;
...
I bet there is no better way then typing a procedure like this?
I think of something like going through a loop and copying fields by their id, or even better: a function alá "copy all field from table2 to table1, skip not existing fields in table1"
Any suggestions?
Regards,
Steffen
Comments
This do TransferFields, but it is based on fields Nos. and if you have same nos. in Table2 and Table3, the fields will be overwritten (and there will be problem if one field with no. XX will be Text in one table and decimal in another...)
But in this case I think that "hardcoded" C/AL := lines will be best (clear code and easy extendable)...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Attention : In V3.60 there is a bug with the field-reference to a decimal : the decimal will be rounded to 4 decimals. This is fixed in 3.70.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!