browsing to a file on the filesystem

hi everyone. I have to implement the following: the user on the item table should be able to select (browse to) some file on the filesystem and the path, name and timestamp of that file should be stored in the item table (the content of the file should NOT be stored in the table). Now using the comand IMPORT, Navision opens a window from where the user can browse through the filesystem and select his file, but i don’t want to store the content of the file in some blob and neither have navision to read the whole file. Using the file virtual table instead, i’ll have to manage the “change directory” by myself and the whole thing will look quite uggly. Is there some comand like IMPORT that provides a window where the user can select a filename and returns the path/filename to navision without having to store the content of a file in a blob (or what else could I do)? thank you very much, Martin Lang

Try using the COMDLG32.OXC (you will have to register it if it is not installed on the workstation already). The following code can then be put in a function and called from wherever the system needs to find a file: COMDLG.DialogTitle := ‘Select your file’; COMDLG.InitDir := ‘C:’; COMDLG.Filter := ‘All files|.’; COMDLG.ShowSave; Path := COMDLG.FileName; Bill Benefiel Manager of Information Systems Overhead Door Company billb@ohdindy.com (317) 842-7444 ext 117

Hello! I am not exactly sure what Martin needs to do, but if the purpose is just to browse for a file, the following should serve most practical purposes: 1. Create a codeunit variable with 412 “Common Dialog Management” as subtype. 2. Then just call the only function it has: OpenFile(WindowTitle : Text[50];DefaultFileName : Text[250];DefaultFileType : ‘’ ,Text,Excel,Word,Custom’’;FilterString : Text[250];Action); For example: DialogMgt.OpenFile(’‘Choose a file’’, ‘’’’, 3, ‘’’’, 0); , where DialogMgt is a variable of type codeunit 412. (This would browse for an *.DOC file) I hope this helps, at least its straight forward:) That OCX solution looks remarkably similar, maybe this question was already answered. /Tero.

Martin : Just in case you did not know, your client’s license must contain the C/OCX granule if you want use any OCX such as COMDLG32 within Navision. ###### tarek_demiati@ureach.com

Look at the Navision-CD, at the compare-tool. I have adapted the forms and CU’s for a similar case, you mentioned. Michael