Examples: Accessing the current database and view

  1. This example displays the database title, its server and database name, its replica ID, and the names of users who have manager access.
    @Prompt([Ok]; "Title"; @DbTitle);
    @Prompt([Ok]; "Server and database"; @Trim(@Implode(@DbName)));
    @Prompt([Ok]; "Replica ID"; @ReplicaID);
    @Prompt([Ok]; "Managers"; @Implode(@DbManager; ", "))
  2. This window title formula displays "New Topic" for a new document; the Subject field if the view title is "AuthorView"; or the Subject field plus the number of response documents otherwise.

    StandardTitle := Subject + @DocDescendants(" (No Responses)"; " (1 Response)"; " (% Responses)");
    @If(@IsNewDoc; "New Topic"; @ViewTitle = "AuthorView"; Subject; StandardTitle)
  3. This column formula displays the Subject field, the user name, and the number of response documents.
    Subject + "  (" + @Name([CN]; From) + @DocDescendants(")"; ", % response)"; ", % responses)")