Schema

Forms Developer Guides Scripting Schema

Schema objects lookup and update resources like calendars, reports, or fields. In client-side scripts, methods respect the current user's permissions. Server-side scripts can create, read, and update any resource.

The schema "managers" (like form.calendars) handle lookups, while the schema "objects" (like form.calendars.first()) refer to individual resources.

Schema data is loaded on demand with the load method. load returns a Promise, which resolves with the "manager" for convenience.

var form = Form.new("permalink");

form.calendars.load().then(function(calendars) {
  // These two objects are identical.
  calendars === form.calendars();
});
Form Resources

Schemas managers for resources belonging to forms are available as Form object properties. For example, use Form.new(permalink).reports to get a specific form's reports.

  • calendars — Create, read, and update a form's calendars.
  • fields — Create, read, and update a form's fields.
  • headers — Read a form's header fields (like "creator", or "author").
  • kanbans — Create, read, and update a form's kanbans.
  • procedures — Read or execute a form's procedures.
  • reports — Create, read, and update a form's reports.