How To enter filename when modifying the request form of a dataport?Author: Luc Van Dyck
When creating a dataport using the wizard, the request form contains the controls "File Name"
and "Direction". In design-mode, the request form is empty, so these controls are added by
Navision at run-time.
When controls are added to the request form, you loose the ability to choose a filename for the
Steps to add the filename control
Define a global variable txtFilename of type Text
Place a Label and TextBox control on the request form
Modify the following properties of the TextBox control:
Caption: File Name
Modify the following property of the Label control:
Put this code in the OnPreDataport-trigger: CurrDataport.FILENAME := txtFilename;
Note: It is essential that the ID of the TextBox control is set to 1. Otherwise, you can't browse for the file when pressing the AssistEdit button.