Hi,
I'm trying to convert a part of a string to a decimal.
Part of the code (dataport):
IF ( (COPYSTR(Importregel,11,2) = 'DR') OR (COPYSTR(Importregel,11,2) = 'DF') OR
(COPYSTR(Importregel,11,2) = 'CR') OR (COPYSTR(Importregel,11,2) = 'CF') ) THEN
StartpositieBedrag := 13
ELSE IF ( (COPYSTR(Importregel,11,1) = 'D') OR (COPYSTR(Importregel,11,1) = 'C') ) THEN
StartpositieBedrag := 12;
IF ( (COPYSTR(Importregel,15,2) = 'DR') OR (COPYSTR(Importregel,15,2) = 'DF') OR
(COPYSTR(Importregel,15,2) = 'CR') OR (COPYSTR(Importregel,15,2) = 'CF') ) THEN
StartpositieBedrag := 17
ELSE IF ( (COPYSTR(Importregel,15,1) = 'D') OR (COPYSTR(Importregel,15,1) = 'C') ) THEN
StartpositieBedrag := 16;
EindpositieBedrag := StartpositieBedrag;
WHILE COPYSTR(Importregel,EindpositieBedrag,1) IN DO
EindpositieBedrag := EindpositieBedrag + 1;
BedragTxt := COPYSTR(Importregel,StartpositieBedrag,(EindpositieBedrag-StartpositieBedrag));
// MESSAGE('Bedrag: %1', BedragTxt);
EVALUATE("LB-Mutaties bankafschriften".Bedrag, BedragTxt);
The message is disabled, but when enabled, it shows the correct values. For example "2618,", "214,2" or "150,14".
However the LB-Mutaties bankafschriften".Bedrag is not filled correctly (all records showing zero). Other fields in the imported records are correct.
Any help/suggestions appreciated!!!
Kind regards,
Gerard
Gerard van Kuijl - United -
http://www.united4all.nl0
Answers
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Thanks for your reply.
Yes I'm sure it's no flowfield. It it is defined as a decimal in Globals.
However my problem is solved already (see title), I used an incorrect record-reference.
Kind regards,
Gerard