@DbName (Formula Language)

Returns the name of the current Domino® server and database.

Syntax

@DbName

Return value

server ; path

Text list with two elements:

Usage

Be careful when using @DbName in a column formula. If you build a view, then move the database within the file directory, thus changing its path, you must force a rebuild of the view (Cntl+Shift+F9) for the function to display the updated database information.

Examples

  1. This example returns ";PERSONAL.NSF" if the current document is in the PERSONAL database stored in the data directory of the user's own computer.
    @DbName
  2. This example returns "SALES1;ADMIN\STATUS.NSF" if the current document is stored in a Domino database named STATUS.NSF in the ADMIN directory on the SALES1 server. If the database is stored at the server's root directory (that is, it is not stored in a subdirectory), the result would be "SALES1;STATUS.NSF." You can extract just the file name of the list by combining @DbName with @Subset, as shown in the example.
    @DbName
  3. This example returns "STATUS.NSF", the file name, since this is the last element in the returned list.
    @Subset(@DbName;-1)
  4. This example returns the path of the current database, without the file name. For example, if the current database is SENSES\SOUNDS\SIGH.NSF, this formula returns "SENSES\SOUNDS."
    @LeftBack(@Subset(@DbName;-1);"\\")
  5. This example displays the server, path, and file name of the current database, substituting the common name for the hierarchical name of the server.
    database := @Subset(@DbName; -1);
    server := @Name([CN]; @Subset(@DbName; 1));
    @Prompt([OK]; "Database name"; @Implode(server) + " " + @Implode(database))

Language cross-reference

FileName property of LotusScript® NotesDatabase class

FilePath property of LotusScript NotesDatabase class

Server property of LotusScript NotesDatabase class

FileName property of Java™ Database class

FilePath property of Java Database class

Server property of Java Database class


Additional Documentation | Trademarks |