Import Export on different location

tularamtularam Member Posts: 97
edited 2012-04-19 in NAV Three Tier
Hi all,

I am using dataport for exporting the data. Here i like to do import and export via same dataport.
But one thing about it is if user selects import then it should import from the predefined location(C:\Import) and
if the user selects export then it should export to the predefined location different than the import location (C:\Export)
Is it possible using only one dataport?

Answers

  • DenSterDenSter Member Posts: 8,307
    By default, dataports provide the ability to select a file or a destination. The user selects whether it is an import or an export, and based on that selection you then enter a path or browse to a file.
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    You can use CurrDataport.FILENAME to get or set the filename:
    FILENAME (Dataport)
    Use this function to return the current setting of the FileName property of a dataport, and to set this property to a new value.

    [CurrFileName] := FILENAME([NewFileName])
    CurrFileName

    Data type: text

    The current setting of FileName property.

    NewFileName

    Data type: text

    The new setting of FileName property.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • tularamtularam Member Posts: 97
    You can use CurrDataport.FILENAME to get or set the filename:
    FILENAME (Dataport)
    Use this function to return the current setting of the FileName property of a dataport, and to set this property to a new value.

    [CurrFileName] := FILENAME([NewFileName])
    CurrFileName

    Data type: text

    The current setting of FileName property.

    NewFileName

    Data type: text

    The new setting of FileName property.

    Yes i knew it but want different file location on import and export
  • Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    Then use it together with CurrDataport.IMPORT to know if someone is importing or exporting.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
Sign In or Register to comment.