Reference
Field types
The seven field types, their JSON values and how they compare.
| Type | JSON value | Queries | Sorting | Index key | In plugins and nodes |
|---|---|---|---|---|---|
Text | string | All operators; compared ignoring case; ~= contains | By code point, ignoring case | Upper-cased, up to 512 UTF-8 bytes | string |
Integer | number (64-bit integer) | = != < <= > >= | Numerically | long | long |
Decimal | number | = != < <= > >= | Numerically | decimal | decimal |
Boolean | true / false | = and != only | By value | bool | bool |
DateTime | ISO 8601 string | = != < <= > >=, by instant | By instant | UTC ticks | DateTimeOffset |
Reference | GUID string | = and != only | By value | Guid | Guid |
Json | any JSON value | Not type-checked | — | Not indexable | JsonNode |
Notes
- A field's type can't change once it's defined.
- DateTime values without an offset are treated as UTC. The portal shows them in the reader's time zone and saves them as UTC.
- Reference fields hold the id of another entity. On their own they're just ids; a relationship makes the database check them.
- Json values aren't type-checked, and can't be grouped by in aggregates.
- In all types, a missing value sorts last, fails
=,<,>,<=and>=, and passes!=.field = nullfinds entities without a value.
In workflows and web parts
Workflow node inputs and outputs, and web part connections, use the same type names. Workflows add Choice (one of a list of names, from a C# enum). Web part connections treat Integer and Decimal as interchangeable, and a Json consumer accepts any type.