Setting filenames extensions masks in Dataport

Hi Developers! I have to set a different filename extension mask (normally *.TXT) in the std. dataport file select dialog (Not with the ComDlg.OCX). I have tried to set the filename variable with my personal mask on the OnOpenForm trigger of the request form and this work well, but I don’t like this solution because in the textbox control of the request form appear my mask… Have you an alternative good idea?

go to www.mynavision.net, Forum: Navision Tips & Tricks, my posting form July 29th 2000, title: Dataport requestform. Marcus Fabian phone: +41 79 4397872 m.fabian@thenet.ch

Sorry Fabian, probably my post was enigmatic… I have no problem showing the control for the filename selection, but I want to pre-select a different filename mask (not the standard *.TXT) in the opened file selection dialog. Thanks however for your rapid replay.

Navision calls the Windows Common Dialog with the file-filter preset and you can’t change that. But there’s no objection against using the Common Dialog (comdlg32.ocx) under your own control. Then you can set the extension filter to any pattern you like, allow multiple selection, and other nice things. Samples have been provided before in this forum, or download the wrapped version from www.mynavision.net John

Hi all. There is a way to show only a for example .xls-files without ComDlg.OCX! You have to create your own Requestform in the way as Fabian described earlier. In the OnOpenForm-Trigger of the Requestform you say: := ‘*.xls’; where is the SourceExpression of the Textbox from which you call the Filedialog. In the Filedialog-window the Filename shows *.xls and the Filetype shows *.txt, but only Excel-files will be shown! Greetings Frank

Hi Frank, Your solution is the same that I have tried to explane in my first post, but I don’t like this solution because the extension filter is showed first in the Textbox. Emanuele