Skip to main content

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:

  1. Select the design/interface to view its details in the right panel.

  2. Use the tab bar to select the Attributes tab.

  3. Select Edit in the action bar and choose Add attribute.

About to select Add Attribute on the Attribute tab of a design
  1. In the left panel, choose the type of attribute to add.
The list of attribute types
  1. Fill in the displayed fields as desired and then select Create to finish.
The properties of a Yes/No attribute

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:

IconTypeDescriptionInput Method
AQSStore an AQS query in JSON formatBuild a query in the AQS Builder
DateStore a date value, e.g. 30 April 2024Select a value with the calendar picker
Date TimeStore a date and time value, e.g. 2 July 2025 13:30:00Select a value with the calendar picker
GeometryStore geometry coordinates in GeoJSON formatDraw points, lines or polygons using the Geometry Editor
JSONStore JSON codeType into a fullscreen JSON Editor
LinkStore the ID of one or more items of a specific design/interfaceSelect one or more items with the item picker
NumberStore a number value, e.g. 256, 3.1415Type directly into the field
SeasonalStore a date without a year, e.g. 25th DecemberSelect a value with the calendar picker
TextStore a text value, e.g. My friends and I love Alloy and use it every dayType directly into the field
TimeStore a time value e.g. 14:20:55Select a value with the calendar picker
Yes/NoStore a boolean value, e.g. true or falseToggle the field to enable/disable it