Portal guide

The entity editor

Edit an entity through its perspectives and forms, add a perspective, and delete.

The entity editor shows one entity through its perspectives and their forms. Open it by pressing a row in a view, a link in a relationship column, or New.

Perspectives and forms

At the top are the entity's perspectives that you can read. Under them are the chosen perspective's forms, in order of display name (the address can name one with ?form=). A perspective without forms gets All fields: each of its fields, in order, in one column.

One record with three perspectives (Contact, Customer and Staff), showing the Staff details form.
One record, three perspectives
Thabo is a contact, a customer and a member of staff: one record, with a tab for each perspective, his manager as a lookup and his reports in a sub-grid.

Thabo is a contact, a customer and a member of staff: one record, with a tab for each perspective, his manager as a lookup and his reports in a sub-grid.

Under the tabs, the chosen form is drawn in its layout.

What's on a form

On the formDrawn as
Text fieldA text box.
Integer, DecimalA number box.
BooleanA check box.
DateTimeA date and time box, in your time zone. It's saved as UTC.
JsonA text area, checked as you type.
ReferenceThe id it holds. (Use a lookup to choose one by name.)
Heading, text, dividerAs set on the form.
LookupA search box and drop-down over a view.
Sub-gridThe rows of a view that refer to this entity.

Required fields are marked. The form's label, hint, placeholder and read-only settings apply.

Lookups

A lookup picks the entity this one refers to, such as an order's customer:

  • Type to search the lookup's view. Entering the box selects its text, so typing replaces it.
  • Pick a result from the list, which opens under the box (or over it), sized to fit.
  • If you leave the box without picking, the chosen entity comes back.
  • Clear empties it; Open goes to that entity.
A lookup listing the customers whose text columns contain wo.
A lookup
A lookup searching the customers view as you type.

A lookup searching the customers view as you type.

Sub-grids

A sub-grid lists the entities that refer to this one, such as a customer's orders, ten at a time and sortable. Pressing a row opens it. On a new entity the sub-grid shows a note until the entity is saved.

A customer's form, with a sub-grid of their orders.
A customer
A customer in the entity editor: their form, with a sub-grid of their orders.

A customer in the entity editor: their form, with a sub-grid of their orders.

Saving

  • Changes are kept while you move between the entity's perspectives and forms, and marked Unsaved changes.
  • Save sends only the changed fields, with the version you read. If someone else saved first, the save fails and says so: discard your changes to see theirs.
  • Discard throws your changes away.
  • On a new entity, Create makes it with the perspective and the fields filled in, then opens it.
  • Leaving with unsaved changes asks first, and closing or reloading the page asks the browser to warn you.

Adding a perspective

Add perspective, beside the perspective tabs, gives the entity a perspective it hasn't got, from those you can write. The dialog asks only for the new perspective's required fields that the entity has no value for yet: a field it shares with a perspective it already has is filled in. Then it adds the perspective with those values in one write, and opens its tab.

For example, adding Staff to a Customer asks only for the employee id, because the name is already there.

Deleting

Delete asks first, naming every perspective the entity will be removed from, then deletes it and goes back to the list.

  • If someone saved in between, nothing is deleted, and the editor says so.
  • If other entities still refer to this one through a relationship, the database refuses, and the editor lists why. Delete or re-point them first.

Add perspective and Delete are off while there are unsaved changes: save or discard them first.

Permissions

  • Editing and Save need Write on the perspective. Without it, the form is read-only, with a note.
  • Add perspective offers only the perspectives you can write.
  • Delete needs Write on every perspective the entity has.
  • An entity opened through a perspective it doesn't have is read-only, with a note.