DatabaseNames
Category: Design
Syntax: DatabaseNames |
Parameters:
None
Data type returned: Text
Description: Returns a carriage returndelimited list of currently open databases (filenames), whether open as a client of another machine or open locally.
Note that on Windows, the .fp7 extension is not returned. This means that the function is consistent across both platforms.
Use caution when checking for hard-coded strings in calculations. If someone renames a file, any calculation containing the old value will no longer behave as before. Get (FileName) can be used in conjunction with a startup script to see whether a filename has been changed, and developers may want to consider establishing a centrally controlled custom function or variable for such checks.
Examples:
In a circumstance where three files are open, Customers, Invoices, and Invoice Line Items, DatabaseNames() will return Customers¶Invoices¶Invoice_Line_Items.
PatternCount ( DatabaseNames; "Customers" )
Returns 1 if the Customers database is open.