Populate Values on Dataport

Hello NAV experts,

I created one button on Sales Order Form (Form 42) that will run a dataport when this button is pushed. This dataport is uses Sales Line table and setup to run an export only.

  1. How to capture the Sales Order number on Form 42 and populate it as a default value on my dataport (“Document No.”)?

  2. How to program my dataport to default the File Name the same as the Sales Order number?

For example: Order No 123456 on Form 42 is opens.

When the export button is pushed; I want this Order No 123456 is populated automatically on the “ Document No.” field and the FileName is defaulted as 123456.txt

Thank you for your helps.


Hi Zen,

Welcome back. Haven’t seen you for a long time.

Ad 1)

Create a function in the dataport to transfer the filter to the dataport before running it - there are many examples on such SetFilter functions in the standard systems.

Ad 2)

The filename is just a text string, so it’s just copy it to a text and add the .txt.

Hi Erik,

Thank you for remembering me [Y]: I am surprised. It’s been a while. Life is seems keeping me in a loop. I thought I was done with NAV.

I’ll try to find the examples of SeFilter function. It would be great if you could mention 1.



Ok that was more difficult to find than I thought but check report “Copy - VAT Posting Setup”.

Also check this:

Thank you very much Erik.

I’ve been happy to help you. Now I hope we’ll see you again soon…


Just please remember to “verify” the post that helped you solve your question…