Tech Tip: The 4D system variable "Document"
PRODUCT: 4D | VERSION: | PLATFORM: Mac & Win
Published On: April 10, 2002
The three commands Open document, Create document, and Append document enable you to access a document using the standard Open or Save file dialog boxes. When you access a document through a standard dialog, 4D returns the full pathname of the document in the "Document" system variable.
With the "Document" variable, you could do something like this:
$docID:=Open document("") `display the standard open dialog
'Do something
CLOSE DOCUMENT($docID)
If ($docID>?00:00:00?)
FileName:=extractName (document)
`extractName is a method which parses the path and grabs the name of the file
End If