Get Dataport field Separator at Runtime

flint
flint Member Posts: 44
hi,

I have to develop a dataport ans i want to write some extra data manually at run time on every exported record(actually another dataitem from a table)

The probleme is that i want to get the record separator used to add my fields
manually .

Is there any methode to get the field separator used in a given dataport at runtime ?

Thanks

Comments

  • lubost
    lubost Member Posts: 633
    No, it is not possible.
  • remco_rausch
    remco_rausch Member Posts: 68
    Hi,

    I presume that you're using a standard dataport where the fields that are exported are specified in the field designer (dataport dateitem->view->dataport fields).

    If so what you want to do is add variables to this list and populate these variables with the extra data you want to export, this way you won't have to worry about the seperator the dataport is using.

    Hope that helps,

    Remco
  • flint
    flint Member Posts: 44
    Hi,

    Actually what i want to do is :

    One my dataport export the records from the table, i search records from another table and append the fields of this record to the first record(by calling currfile.WRITE(field1+fieldseparator+field2...),.

    To do that, i need to know the fields separator used by the standard Dataport

    Thanks for your help
  • Slawek_Guzek
    Slawek_Guzek Member Posts: 1,692
    Hi,

    Much better way will be to setup some global variables in your dataport, and to list them in Dataport fields like normal fields from the table.

    Then in OnBeforeExport populate your variables with data from the second table, ant that's it.

    Regards,
    Slawek
    Slawek Guzek - www.yitron.co.uk
    Business Central, MS SQL Server, Wherescape RED;
  • colingbradley
    colingbradley Member Posts: 162
    I agree with Slawek but you should also make sure you clear the variables before each record.
    Generally, I use all variables rather than a mixture of fields and variables.
    Experience is what you get when you hoped to get money
  • flint
    flint Member Posts: 44
    Hi,

    thanks a lot it was very helfull O:)