KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: A simple way to allow users to choose the location and file name
PRODUCT: 4D | VERSION: 6.8 | PLATFORM: Mac & Win
Published On: February 28, 2003
Your current browser may not allow you to download the asset. We recommend Mozilla Firefox or Google Chrome.
Log In

The following code allows users to define a location and file name through a create file dialog.

$vdocref:=Create document("";"TXT") `allows the user to pick a location and name
CLOSE DOCUMENT($vdocref) `closes the document
DELETE DOCUMENT(document) `deletes the document

After using this method, the internal variable "document" holds the path and name of the file that the user created. You can then use this variable to retrieve the complete pathname.