Adding custom attributes
Define new data fields in a design/interface
A design (or interface) defines a set of attributes that collectively describe a concept, such as a type of asset or task. An attribute can store data or link to items of a particular design/interface.
You can add new attributes to any design/interface in Alloy, providing your user profile has permission to do so!
Add a custom attribute
To add a new attribute to a design/interface:
-
Select the design/interface to view its details in the right panel.
-
Use the tab bar to select the Attributes tab.
-
Select Edit in the action bar and choose Add attribute.
- In the left panel, choose the type of attribute to add.
- Fill in the displayed fields as desired and then select Create to finish.
These properties are common to all attribute types (* mandatory):
-
Name * - enter a distinct name that clearly identifies the attribute.
-
Required - if enabled, the attribute will need to be populated with a value before the item can be saved. It can't be left blank!
-
Read-only - if enabled, the attribute can only be populated when creating items. It can't be edited later!
-
Unique - if enabled, the attribute won't accept a value that's already stored in the same attribute on another item of this design/interface.
- Default value - the attribute will automatically be populated with this automatically, unless another value is entered (unless Read-only is enabled).
Other attribute types have additional properties. For full details, follow the article links below:
Icon | Type | Description | Input Method |
---|---|---|---|
AQS | Store an AQS query in JSON format | Build a query in the AQS Builder | |
Date | Store a date value, e.g. 30 April 2024 | Select a value with the calendar picker | |
Date Time | Store a date and time value, e.g. 2 July 2025 13:30:00 | Select a value with the calendar picker | |
Geometry | Store geometry coordinates in GeoJSON format | Draw points, lines or polygons using the Geometry Editor | |
JSON | Store JSON code | Type into a fullscreen JSON Editor | |
Link | Store the ID of one or more items of a specific design/interface | Select one or more items with the item picker | |
Number | Store a number value, e.g. 256, 3.1415 | Type directly into the field | |
Seasonal | Store a date without a year, e.g. 25th December | Select a value with the calendar picker | |
Text | Store a text value, e.g. My friends and I love Alloy and use it every day | Type directly into the field | |
Time | Store a time value e.g. 14:20:55 | Select a value with the calendar picker | |
Yes/No | Store a boolean value, e.g. true or false | Toggle the field to enable/disable it |