Options

Dataport file name

DanDan Member Posts: 9
Good morning,

I am exporting purchase lines using dataport using a button on a purchase header. The lines are filtered to the current record on the on push trigger.

I want to save this export to different filenames for each "location code" using CurrDataport.Filename on the OnInit trigger of the dataport.

Both methods I've used return an empty value:
1/ trying to save the value of purchaseheader."Location Code" to a variable on the on push trigger;
2/ trying to retrieve the value purchaseheader."Location Code" on on OnInittrigger.

How can I make this work?

Comments

  • Options
    krikikriki Member, Moderator Posts: 9,090
    On the form, declare a variable of the dataport. When you run the dataport using that variable, you have the possibility to set the name directly in the dataport-variable using its properties.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Options
    DanDan Member Posts: 9
    Ok for the filename when I use a variable to execute the dataport; but now I've lost the possibility to filter on those particular purchase header order lines?
  • Options
    geordiegeordie Member Posts: 655
    It's still possible to mantain this functionality setting the filters on a purchase line record variable and using a statement like:
    YourXMLportVar.SETTABLEVIEW(PurchLine);
    
  • Options
    krikikriki Member, Moderator Posts: 9,090
    It is a dataport, not an XMLport. But the same trick works for dataports. And if needed, you can also create a function in which to receive parameters in the dataport.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.