Calling a dataport with parameters

alex2605alex2605 Member Posts: 16
Hi all,

I'm working on a function wich calls a dataport out of a codeunit.
Does anybody know if there's a possibility to call that dataport with a parameter. In my case I want to pull over the job number which i have as a variable in the CU.

Thanks in advance

Alex

Answers

  • SofDanielSofDaniel Member Posts: 7
    Create a variable JobNumber and a function SetJobNumber in the dataport.

    SetJobNumber(Job : Code[10])
    JobNumber := Job;

    Then, in the init of the Dataport, filter the data with the value of JobNumber.


    In the CodeUnit, call the function before runing the dataport

    aDataPort.SetJobNumber('MYJOB');
    aDataPort.RUN;
  • garakgarak Member Posts: 3,263
    The same principle:

    viewtopic.php?f=14&t=29492

    Regards
    Do you make it right, it works too!
  • alex2605alex2605 Member Posts: 16
    Thank you very much.
    Works great!
Sign In or Register to comment.