How Can I Read a Record into an Array?

rosenberglrosenbergl Member Posts: 37
Hello NAV Experts.

I created a table that contains sales figures by accounting period so the table for each key (Year, Customer, Item) has sales buckets for each period (P1, P2, P3,…).

How can I read a record and sum the sales period fields? Is there a way to use an array so that I do not have to do this:

SALES := SalesRec.SalesP1 + Sales2 + SalesRec.SalesP3 + SalesRec.SalesP4 + SalesRec.SalesP5 + SalesRec.SalesP6 + SalesRec.SalesP7 + SalesRec.SalesP8 + Sales P9 + SalesRec.SalesP10 + SalesRec.SalesP11 + SalesRec.SalesP12;


Thanks,
Lewis.

Comments

Sign In or Register to comment.