Attribute types
The attribute types available and when to use each.
Every column in a data object is an attribute, and each attribute has a type. The type decides what a record can store in that field, how the value is displayed, and how you can filter, sort and import it. Choosing the right type up front keeps your data clean and your views useful.
Where types are chosen
You pick a type when you add an attribute. Open the object's Attributes tab: from its record grid, the ⋯ (More) menu at the top right, then Attributes under Settings; or Settings › Features › Data Objects, the object, then Attributes. Click New attribute. In the New attribute form, the Type field opens a searchable list. See Configure the object for the other tabs.
Add several attributes in a row
To build out a schema quickly, keep the create dialog open between attributes. In the New attribute form, turn on the Create other attributes switch before you click Create. The dialog stays open and resets for the next attribute, and each one you add appears under Created attributes at the top of the form. Turn the switch off, or close the dialog, when you're done. Task and file fields are added one at a time, without the switch.
Types you can add
| Type | Use it for |
|---|---|
| String | Free text up to 255 characters, such as names, references, emails or URLs. |
| Number | Numeric values you want to compare or aggregate. |
| Date | A calendar date with no time component. |
| Boolean | A yes or no answer, or none yet. |
| Select | One value from a set you define. |
| Multi-select | Any number of values from a set you define. |
| User | One or more members of the workspace. |
| File | Files from the workspace's Files. |
| Relationship | A link to records in another data object. |
| Formula | A value computed from other attributes. |
String, Number, Date, User and File need no extra setup: pick the type and create the attribute. Boolean offers its colors, and Select, Multi-select, Relationship and Formula carry their own configuration, covered below.
Booleans
A boolean reads as a colored bullet rather than a word, which makes a column of them scannable at a glance. There are three states, not two: Yes, No, and None for a record that has no answer yet. Before, an empty boolean was drawn as No, so "we have not checked" and "we checked and it is not" looked identical.
Each state's color is configurable. On the attribute, when you create or edit it, the Colors field shows a swatch per state: click a swatch to pick its color. The swatches open on the workspace's colors, and only the ones you change are kept on the attribute. The workspace default is Default boolean colors in Settings › Features › Display, with a Preview of the three.
The bullet carries its state's name for screen readers and on hover, because color on its own is not a readable value. In edit mode (Edit records), each cell writes the name beside its bullet, and a cell's picker offers Yes, No and None, each with its bullet: there you are choosing the value rather than scanning it.
Select and Multi-select
Some columns should not accept free text. A status, a region, a strategy has a known set of answers, and letting people type them means three spellings of the same thing by the end of the quarter. Select holds one value from a set you define; Multi-select holds any number of them.
Define the values when you create the field
- Set the attribute's Type to Select or Multi-select.
- An Options section appears. It tells you which kind you picked: Records can hold one of these values., or Records can hold any number of these values.
- Type the first value in the Option name box, then click the dot before it to pick its color.
- Click Add option for each further value.
- Create the attribute.
A field needs at least one option, so the last remaining row cannot be removed; every option needs a name, and no two can share one. Colors are worth spending a moment on: they are what makes the column scannable once it is full of records, and they carry through to the record grid, the task side panel and canvas widgets.
Every field owns its own set of values. Two Select fields in the same workspace never share options, so a Status on one object and a Status on another can mean completely different things without interfering.
Manage the values afterwards
Open the attribute from the Attributes tab and the same Options section lists its current values. Editing here works differently from the rest of the dialog: each row is saved on its own, as you make the change, rather than when you save the attribute. An option is a record in its own right, not part of the column definition.
- Rename a value by typing in its row. The change commits when you click away or press Enter.
- Recolor it from its color picker.
- Add a value with Add option. It arrives named New option, ready to rename.
- Remove a value with its bin (Remove option), then confirm.
Renaming a value updates it everywhere it is already used, since the records point at the value rather than holding a copy of its name. Two values in use cannot share a name: a rename to a name the field already offers is refused, and the row goes back to its old name.
A value in use is archived, not deleted
Removing a value that no record holds deletes it. Removing one that records still hold archives it instead, and a message says how many records use it. Two things follow, and both are deliberate:
- The records keep their value. The column still reads correctly; the chips are simply drawn dimmed, so an archived value is visible as one at a glance.
- Nobody can choose it again. It leaves the picker, so the value stops spreading while you decide what to do with the records that have it. A record that still holds it lists it in its own picker, so you can take it off; once taken off, it cannot be picked again.
An archived value frees its name. You can add a new value with the same name, for example to bring back In review in another color: the records that held the old one keep it, dimmed, until you pick the new one, and an import that names In review fills in the new one.
Filling the column
- By hand, in the record form, or in the grid once you click Edit records: the picker lists the values with their colors under a search box, and the ones the record already holds come first.
- By import: a CSV can fill these columns, and values are matched by name, whatever their case. You do not need to know any ids. In a Multi-select cell, separate the values with commas.
- From a workflow, with Save records, the same way.
An imported value whose name matches nothing in the set is reported as an error on that cell, not quietly added as a new option, and an archived value does not match either. That is deliberate: a typo in a delivery should not silently extend your value set. Fix the file, or add the value to the field first, then import again.
User
A User attribute holds one or more members of the workspace. It needs no configuration: the set of values is the membership, so the field is ready as soon as you create it, and it keeps up as people join and leave.
Like the option types, a user column is filled by picking from a list rather than typing. A CSV import cannot fill it: set it in the grid or the record form.
Relationships
Relationships let related data travel together. Once a share class links to its fund, you can show the fund's fields beside it, filter one by the other, and give a canvas or an agent a joined-up picture instead of isolated tables.
Choose Relationship and a Relationship section appears with two choices:
- Associated data object: the object this attribute links to (any object except this one). It starts on the first one; its picker searches every data object in the workspace.
- Relationship type: One to one, Many to one, or Many to many. A sentence under the fields spells out the cardinality you picked, for example "Many Share Classes can be linked to one Fund".
Both are fixed once the attribute is created. You don't pick which field of the linked object to show here. A linked record appears as a chip labelled by the target object's own Reference display setting (see Configure the object). A chip too long for its column is cut short, and hovering it reveals the whole label; a link to an archived record is drawn muted. A Many to many cell shows the first linked record and a count of the others, which the count names on hover. Deleting a linked record does not delete the records that point at it; it simply detaches the link.
Set the target object's Reference display before you rely on a relationship column. Until you do, SPARK names linked records by a column it picks for you (a name or title column if there is one, else the first two text, number or date columns), which is better than an id but may not be the label your team uses. It is one setting on the object, and it fixes the column everywhere the relationship is read, including CSV exports.
Formulas
Choose Formula and a Formula field gives you an expression editor. A formula is computed automatically for every record, so there is nothing to type per row.
- Reference other attributes by their name, and combine them with functions and the operators
+,-,*,/(and the comparisons>,<,>=,<=,=,!=). As you type, the editor suggests functions and attribute names. - The functions available are SUM, MULTIPLY, DIVIDE, SUBTRACT, AVERAGE, ABS, POWER, CONCAT, UPPER, LOWER, SUMLIST, AVGLIST and IF. The help icon beside the field's title lists each with its signature.
- SUMLIST sums the values in a list field, the values of the records a relationship links to; AVGLIST averages them, for a value repeated on each related row.
- For example,
MULTIPLY(Quantity, Price)orIF(Status = "Settled", 1, 0).
When a formula returns a number, you can format how it displays (see below). Formulas have no validators, since their value is derived rather than entered.
Files
A File attribute links each record to files in the workspace's Files. Its cell opens a picker of every file in the workspace, where you choose any number of them and can preview or download one. To attach a new file, upload it to Files first. File attributes take no validators.
Format how a number displays
Numbers keep their stored value but can be formatted for display. Without any formatting set, a number shows with a comma as the thousands separator and two decimal places, for example 1,234,567.89, and number columns are right-aligned in the grid so their digits line up.
To change it for one attribute, open a number attribute's ⋯ menu on the Attributes tab (it shows when you point at the row) and choose Display configuration:
- Display format: Number, Percentage, or Custom. Percentage multiplies the value by 100 and adds
%. - Decimal places (0 to 10), and the Decimal separator and Thousands separator to use (the thousands separator can also be None, and the two cannot be the same).
- With Custom, a Multiplier, a Prefix (for example
€), and a Suffix (for example%). This is how you present currencies or units; there is no dedicated currency type.
A Preview shows three sample values in the format as you set it, and Save applies it. To change the default for the whole workspace instead, use Settings › Features › Display; an attribute's own configuration wins over the workspace's. Formatting applies everywhere the attribute is shown, canvas widgets included: a chart's axis ticks, its on-chart labels and its tooltips, and a KPI's value all use the attribute's own configuration rather than the workspace default. See Chart and KPI.
The same option is available for formulas that return a number.
Validators and uniqueness
Attributes don't have a "required" or "unique" checkbox. Instead:
-
Validators are rules you add to an attribute: under Validators, click Add validator, then pick the rule and, where it takes one, its value. SPARK checks them on every write, whether a record is edited, imported or saved by a workflow. Required works for every type that takes validators; the others depend on the type:
- String: Min length and Max length (in characters), Regex (a pattern), In list (values separated by commas).
- Number: Min value, Max value, Integer only.
- Date: After and Before (a date from a calendar), Past only, Future only.
- Boolean: Must be true, Must be false.
Each rule is added once, and rules that contradict each other (Past only and Future only, Must be true and Must be false) exclude each other. Select, Multi-select, User, File, Relationship and Formula attributes take no validators.
-
Uniqueness is set on the object's Constraints tab, not as a validator. A constraint on one attribute makes that column unique; a constraint on several makes the combination unique. See Configure the object.
Fields on Tasks and Files
Tasks and Files are data objects too, and you can add your own attributes to them from Settings › Features › Task Fields and File Fields. The types on offer there are narrower (no Formula, and File only on Tasks), and the standard fields SPARK provides are locked. See Task fields and File fields.
Additional types you may see
Some types are created by the system or by templates rather than added by hand. You will encounter them on existing objects and in templates:
- Datetime stores a date together with a time. Every object's Created At and Updated At are datetimes.
- Created By and Updated By, beside them on every object, name who made each record and who changed it last. SPARK stamps them on every write, including archive, restore and bulk edits. A change an agent makes is credited to the person the agent was answering, and one a workflow makes to the service that ran it.
- JSON holds structured data a template's analytics writes, such as the TER signal's expense breakdown.
- Status and Priority back the workflow-style option fields on Tasks.
- File labels tags files with reusable labels.
What this means for import
When you bring records in from a CSV, these types map directly: String, Number, Date, Datetime, Boolean, Select and Multi-select. The option types are matched by name, so a file can say EMEA rather than an id. A String value longer than 255 characters is cut to fit.
The importer lists User, Relationship, File and Formula attributes as not supported, so no column maps to them: set users and links in the grid or the record form, and formulas compute themselves. See Add, edit & import records.