How to define properties and enumerations
Add a property to an element type
Section titled “Add a property to an element type”- Select the M2 element type in the Explorer
- In the Properties panel, open its Property Types section and click + Add Property Type… (or right-click the type in the Explorer and choose New Property Type…)
- Type the name (e.g., “Lifecycle Status”) and choose the data type: String, Integer, Real, Boolean, Date, DateTime, UnlimitedNatural, or one of the metamodel’s enumerations. Press Enter or click Create Property Type. Tick Create another to add several in a row.
- Click the new property type in the list to set its multiplicity (
0..1optional, the default, or1..1required) and, if you like, a default value
The property now appears on all M1 instances of this element type.
A name the type already has is refused. A name that matches a property type the type inherits is allowed: the type’s own one then replaces the inherited one, for it and its subtypes, and the dialog says so.
Put the properties in order
Section titled “Put the properties in order”A type’s property types, its own and the ones it inherits, are listed in its Property Types section as one list; inherited ones are marked from the type they come from. That order is used wherever a model element’s properties are listed: the Properties panel, the properties compartment on diagram nodes, the values on relationship lines, and new board cards and catalog columns.
- Drag a row by its handle (⋮⋮) to move it. The order is saved at once. From the keyboard, focus a handle, press Space, move with ↑ and ↓, and press Space again.
- A type with no order of its own lists its properties alphabetically. A–Z puts a type back to that.
- With an order set, a property type added later goes at the end, where you can drag it.
- Each type’s order is its own: a subtype does not take its superclass’s order, so you can place an inherited property where it suits that subtype.
Only those who can edit the metamodel (admins) can change the order. The order is saved in .farki files.
Create an enumeration
Section titled “Create an enumeration”- Right-click the Enumerations package in your metamodel
- Select New Enumeration… and name it (e.g., “System Status”)
- In its Values section in the Properties panel, click + Add Value…
- Type the name (e.g., “Active”) and press Enter or click Create Value. Tick Create another to add several in a row.
Two values can’t have the same name. Behind each name, Farkitect keeps a stored value, which is what models and .farki files record. It is made from the name when the value is created (active) and never changes, so models keep their values whatever the value is later called. Hover over a value’s name to see it.
Put the values in order
Section titled “Put the values in order”Drag a value by its handle (⋮⋮) to move it. The order of the values is the order everywhere they are listed: every drop-down, a new board’s columns, and a catalog sorted by that property. So values don’t need numbers in front of them to sort the way you want: put them in order instead.
Rename a value
Section titled “Rename a value”Click its name, type, and press Enter or click away. Its stored value stays as it was, so every model element that has the value keeps it. To take numbers off values such as 1-Urgent, put the values in order, then rename each one: the stored values keep their numbers, which show only in .farki files and exports.
Remove a value
Section titled “Remove a value”Click the trash icon beside it. A value no element has is removed at once. If elements have it, Farkitect asks first, says how many, and asks what they get instead: another value, the value moved to their notes, nothing, or the old value left as it is (shown as not found). See How to align values after changing a metamodel.
Refresh values
Section titled “Refresh values”Refresh Values… in the Values section makes each value’s hidden stored value from its name again, and rewrites every copy in the project. It appears only when a stored value no longer matches its name. See How to align values after changing a metamodel.
Use an enumeration as a property type
Section titled “Use an enumeration as a property type”When adding a property to an element type, select your enumeration from the type picker. It appears alongside the primitive types. The property renders as a dropdown in the Properties panel and in catalogs.
Add format hints to string properties
Section titled “Add format hints to string properties”String properties support format hints that change how they’re displayed:
| Hint | Effect |
|---|---|
| multiline | Plain text over several lines: a box that fits its text, from 2 to 20 lines, then scrolls; drag its corner to make it taller or shorter. Shown exactly as typed everywhere, which suits addresses and codes |
| rich text | Formatted text, edited exactly as notes are: bold, headings, lists, checklists, links. The formatting toolbar shows while you edit the field. Catalog cells, board cards and diagram compartments show the text without its formatting; a catalog’s edit window has the full editor |
| url | Renders as a clickable link |
| Renders as a clickable mailto link |
Switch between plain and rich text
Section titled “Switch between plain and rich text”Change a property type’s Format from multiline to rich text, or back, and every value in your models converts in the same step:
- To rich text: nothing changes in how values look. A line break stays a line break (so an address keeps its three tight lines), a blank line becomes a new paragraph, and characters that would otherwise turn into formatting, such as
1.or#at the start of a line, stay as text. - Back to multiline: if no value has any formatting, it just happens. If some do, Farkitect says how many will lose their formatting before it changes anything, and Cancel leaves the format as it was. Paragraphs and line breaks become line breaks, and list items become lines starting
•or1.
To take the formatting off a single value instead, use Clear formatting in the field’s ⋯ menu.
In rich text, as in notes, Enter starts a new paragraph and Shift+Enter starts a new line without the paragraph space, for a tight block such as an address.
Add properties to relationship types
Section titled “Add properties to relationship types”The process is identical — select a relationship type and add properties in the same way, and put them in order the same way. Relationship properties appear in the Properties panel when an edge is selected.