Hi All,
As you all know, when we run a dataport, a option tab with the file name and direction will be available for user to locate the import or export file path.
However, these will not be availble at the option tab when there is a control is added to the request form. The file name and direction are not available, the option tab only show the newly added control.
How can i add more control to the request form and maintain the original file name and direction?
0
Comments
You have to crate a global variable of text type and on the assist edit trigger you write the next code:
Janela.ShowOpen;
IF Janela.FileName <> '' THEN Filename := Janela.FileName;
Janela is a variable:
Name DataType Subtype Length
Janela OCX COMMON DIALOGS CONTROL
then on the Initdataport trigger you write the code:
CurrDataport.FILENAME(Filename);
Regards
Afonso
To enable file-lookup in a dataport where you have put fields on the request-form you have to do the following.
Create a variable to hold your filename.
Put a textbox with accompanying label on the request form. In the properties of the textbox containing your filename you should set ID to 1 and assistedit to yes. Put your variable in the source-expression of the the textbox. Now when you run the dataport you will be able use F6 to look for your file.
The trick is to have the textbox-id set to 1.
Tommy
Thank you so much for replying my question.
I've tried it and it works!
Thank you so much for helping
I am just wondering why the text box ID has to be 1? it only works for ID = 1. what is the relationship between the ID and the lookup?
Nothing in particular that I know of other than the fact that navision on a dataport automatically creates a file-lookup on the field with ID=1. Probably just a hack that Navision created in the "old" days to accomodate the ability to create your own request-form.
Tommy
RIS Plus, LLC
Tommy
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
Tommy
Lessons... Class... Before I done my Application Builder exam for my Application builder licence, I have 5 day AB course (in time of Navision Financials...)
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.