Accessing a form using Java

You can access existing forms in a database as follows:

  • The Forms property of Database returns a vector of Form objects.
  • The getForm method of Database returns a named Form object.

TheForm class provides access to properties through the following methods:

  • getAliases returns a java.util.Vector of String values containing the aliases of the form.
  • getFields returns a java.util.Vector of String values containing the names of all the fields on the form.
  • getFormUsers returns a java.util.Vector of String values containing the $FormUsers field; setFormUsers sets the $FormUsers field to a java.util.Vector of String values.
  • getHTTPURL returns a String value containing the HTTP URL of a form.

  • isSubform returns true if the form is a subform.
  • getName returns a String value containing the name of the form.
  • isProtectReaders returns true if $Readers items are protected from being overwritten; protects $Readers items from being overwritten when set to true.
  • isProtectUsers returns true if $FormUsers items are protected from being overwritten; setProtectUsers protects $FormUsers items from being overwritten when set to true.
  • getNotesURL returns a String value containing the Notes® URL of a form.

  • getReaders returns a java.util.Vector of String values containing the $Readers field; setReaders sets the $Readers field to a java.util.Vector of String values.
  • getParent returns a Database object representing the database containing the form.

Use getFieldType to get an int value containing the type of a specified field on the form.

You can remove an existing form from the database with the remove method of Form.