Copy Field " External Document No" in VAT Entry table with just the first 2 digists

Hello ll,

In table Vat Entry I want to create a new field POS No. which should be a copy of field “External Document No.” but just the first 2 digits of field “external Document No.”.

Please how can I do that?

You have already asked this question earlier today. Why do it again???

can you help me on my double question? :slight_smile:

Sure but again why create two questions???

New field := CopySTR(“External Document No.”,1,2);

Thank you. I am new in this forum, instead of continue with the first one I create a new one :slight_smile:

I wrote in T. VAT Entry in function: CopyFromGenJnlLine () the below code to copy the field but when I save and run it, teh field POS No. is not filled.

CopyFromGenJnlLine(GenJnlLine : Record “Gen. Journal Line”;VATEntry : Record “VAT Entry”)

“POS No.” := COPYSTR(“External Document No.”,1,2);

Please, when the question is the same, then continue in the same thread. I have closed this thread, please continue in:

[View:~/nav/f/developers/95136/group-data-in-nav-2009-reports-using-c-al:320:50]