Dataport export boolean error

GilGil Member Posts: 49
Hi,

There is an issue we've been getting while exporting on dataport. Commonly the issue happens when the data type is Boolean.
The results should be Yes|No , but at times the result is "2".
Has anyone encountered this and if yes, what is the best solution when exporting?

Thanks,
Gil
1.png 5.8K

Comments

  • eyolfthoeyolftho Member Posts: 18
    a field of type Boolean is saved in the database as a tinyint..8 bit integer

    All values except 0 are considered TRUE, 0 = FALSE

    In your case it seems that some other system than NAV is updating the field.

    The easiest workaround is:
    Create a text field in the dataport, length=3

    Include this code on the OnBeforeExportrecord trigger:
    if not <dbfield> then
    MyTxt := 'No'
    else
    MyTxt := 'Yes';

    and then replace the <dbfield> with MyText in the Dataport Fields list.
Sign In or Register to comment.