Common a0 hex problem with exporting

KisuKisu Member Posts: 381
This problem has been so common that it is just annoying.

When I export for example sales line fields with xmlport and there is quantity over 1000. The XML port adds thousand separator which in all windows and windows servers is char a0 hex no break space or something

Now when you look at the exported file all the integer and decimal fields that had value over thousand has that annoyance ](*,)

I've been thinking has anyone done a post codeunit that goes through the xml file or similar that destroys those a0 chars?
K.S.

Answers

  • ta5ta5 Member Posts: 1,164
    edited 2013-10-04
    Hi Kisu
    Normally I use a variable on such fields instead of the table field. On the DataItem- Export::OnAfterGetRecord() I use the format function with the desired format string on the var. Imho this is worth the few lines of code because you get much more control over the output.

    Hope this helps.
    Thomas
  • KisuKisu Member Posts: 381
    Noo, I'm such an idiot, but of course format works with this ](*,)

    Quantity - Export::OnBeforePassVariable()

    bröblemsölved := FORMAT("Sales Line"."Quantity",0,'<Sign><Integer><Decimals,3>');


    Thank you
    K.S.
  • ta5ta5 Member Posts: 1,164
    Hi Kisu
    Welcome!
    Don't be frustrated about the errors you have made, just be happy about the working solution :D
Sign In or Register to comment.