XMLPort: Exporting option fields

I have a strange problem. I have a dataport, which is used to export some data from Navision.

Some of the fields are of the type Option and when I’m running the xmlport, then it’s exporting the options interger value, which is what it is supposed to do.

But when my client runs the same xmlport, then it exports the same fields with the options “text” value.

I actually don’t know what the problem is. But the only thing that I can think of is that my client runs it in Finish and I run it in English.

Have you seen anything similar, and is there a way to enforce that the fields are exported as their interger value?

Probably the easiest workaround would be to use an Integer variable and set that in OnAfterGetRecord

Hi Erik,

I haven’t come across this before but had a similar problem with a dataport. The problem arose where the CaptionML was setup differently for English US v’s English UK. I think if the caption for the language is not setup it using the integer value. Daniel’s suggest is probably the easiest solution.

You know I have seen issues in multi-language where one of the languages did not have all the options in the optioncaptionML, and you’d see the integer instead of the text. See if the finnish optioncaptionML exists, and whether it has all the options in the actual OptionString.

Well thanks for the suggestions. I decided just to use FORMAT directly in the XMLPort with FORMAT(OptionField,0,2) which always will give the integer value of the option field.

As the connection to the multilanguage issue, then it was actually not a field, but a variable, which doesn’t hold a caption.