Typeconversion and dataports

KisuKisu Member Posts: 381
Heyas, I came up with a problem and not sure its possible to overide :/

I'm making a dataport which has some fields I'd need to export but I also would need to combine a code type field and Option type field like:

Code | Option
12345 | 1

Exported:
Code+Option
123451

Is it possible to make? I'm not so familiar with Navisions datatype conversions
K.S.

Comments

  • EugeneEugene Member Posts: 309
    why on earth would you like to combine two fields into one and break 1st normalization form requirement ? If the system that imports data does not have two separate fields then still your should keep two separate fields in your exported file and then let the importing system to combine them.

    If however they insisted on combined version then you can do it by defining a variable in dataport and setting it as dataitem's dataport field
    then in that dataitem's OnBeforeExportRecord() you can set a value for your "virtual" field
  • KisuKisu Member Posts: 381
    Eugene wrote:
    why on earth would you like to combine two fields into one and break 1st normalization form requirement ? If the system that imports data does not have two separate fields then still your should keep two separate fields in your exported file and then let the importing system to combine them.

    If however they insisted on combined version then you can do it by defining a variable in dataport and setting it as dataitem's dataport field
    then in that dataitem's OnBeforeExportRecord() you can set a value for your "virtual" field

    I'm not sure how theyr program works, my boss just gave me the schema how'd they need the information for the export file and the last colum they have they'd need a line of code (numbers) which consist work 5 numbers that 12345 and add to that the type of payment like 1 means normal work and 2 for over work. ex. 123451 or 123452.
    K.S.
Sign In or Register to comment.