contributor or admin role on the group: a reader gets a 403.
Entity type and view type
Each view shows one entity type, given byentityType:
person: the people of the group;company: the companies of the group;- the name of an object type of the group, such as
Deals: the objects of that type. See Custom objects.
type:
table: the entities as rows, sorted bysort;kanban: the entities as cards, in columns made from the options of a single select field, given bygroupBy.
Table view
Settings
Filter
filter selects the entities the view shows. It combines a list of conditions with and or or:
- the conditions are a list, so the same field can appear in several conditions;
in,not_inandallalways take a list, even for a single value;eqandnot_eqon select, user and reference fields take a list and mean “exactly this set of values”;emptyandnot_emptytake novalue.
{ "id" } or { "email" }, people, companies, objects and groups by { "id" }. Dates are given as YYYY-MM-DD or as relative dates, such as today or 7-days-ago. See Dates.
A view only accepts the fields and operators the app offers for its entity type: anything else is rejected with a 422.
Sort
sort orders the entities of a table view, by a single field: { "field": "name", "direction": "asc" }. Kanban views have no sort.
Visible fields
visibleFields is the ordered list of the fields shown: the columns of a table view, or the fields on the cards of a kanban view. The name of the entities is always shown, so it is never listed.
Kanban
groupBy is the key of a single select field of the view’s entity type, such as customFieldValues.grp_92ab3f1c-0386-434d-82d7-a91eb6badd71.Stage. Each option of the field makes a column. If the group has no single select field for the entity type, create one first. Creating a field requires the admin role on the group.
columns lists every option of the groupBy field once, plus null for the “No value” column, in display order, each with hidden:
Position
position places the view among the views of its group, as in the app’s sidebar. A view always returns { "after": <id of the previous view> }, or { "after": null } when it is the first one. To move a view, send { "after": <viewId> } or { "before": <viewId> }, with a view of the same group, or { "after": null } to put it first and { "before": null } to put it last.
Creating and updating a view
A view is created with agroupId, a name, an entityType and a type, plus groupBy for a kanban view. Every other setting is optional.
An update changes only the settings it sends. filter, visibleFields, sort and columns replace the current value as a whole: to add a condition, send back every current condition with the new one. The settings returned when you get a view can be sent back as they are.
A group keeps at least one view of each entity type: deleting the last one is rejected with a 422.
Defaults
The settings that aren’t sent at creation get defaults. They depend only on the entity type and the view type, not on the other views of the group:When a field is deleted
Deleting a custom field of the group changes the views that use it:- conditions on the field are removed from the filter;
- the field is removed from the visible fields;
- a sort on the field falls back to the default sort of the entity type.
groupBy of a kanban view can’t be deleted. Delete the kanban view, or change its groupBy, first.
Fields of a view
The filter, the sort and the visible fields of a view use the same field keys. Not every field can be used in all three. The tables below list the native fields and where they can be used.People views
Fields of the company of people
Company views
Object views
The custom fields of the group of the view are identified by their name:
customFieldValues.<groupId>.<Field name> on people and company views, where <groupId> is the ID of the group, and customFieldValues.<Field name> on object views.
Filtering
Read more about operators and value formats