Automatic Multiple Export

KPLewisBPMKPLewisBPM Member Posts: 12
edited 2004-04-08 in Navision Attain
I have 4 dataports I am running that exports to CSV. Is it possible to creat a form with a button which will automatically run all 4 dataports with the specified file output name and location.

Kind Regards

Comments

  • Torben_R.Torben_R. Member Posts: 99
    Sure.

    In the properties for the dataport you change
    Import to No
    FileName to the exact filename

    On the cammandbutton you add the code
    DATAPORT.RUN(DATAPORT::"Dataport # 1",FALSE);
    DATAPORT.RUN(DATAPORT::"Dataport # 2",FALSE);
    etc.
  • KPLewisBPMKPLewisBPM Member Posts: 12
    Thanks Torben R.

    Works fine... When I run it asks if I want to overwrite the CSV file that already exists (4 times), Can I get it to ignore this msg and overwrite all 4 csv's automatically?

    Kind Regards
  • wesleyswesleys Member Posts: 30
    KPLewisBPM wrote:
    Thanks Torben R.

    Works fine... When I run it asks if I want to overwrite the CSV file that already exists (4 times), Can I get it to ignore this msg and overwrite all 4 csv's automatically?

    Kind Regards

    Within the AL code of the dataport within the "Dataport - OnInitDataport()" event add this command:

    CurrFile.QUERYREPLACE(FALSE);

    This will make the dataport not prompt for file replacement.
  • KPLewisBPMKPLewisBPM Member Posts: 12
    Everything is now working according to my outlined specification.

    Thanks for your help Guy's

    Kind Regards

    K Lewis
Sign In or Register to comment.