Custom fields are defined in their own descriptor file, with properties that define whether the field is viewable (and by whom), queryable (can be used as a filter in a query), sortable (can be used as a sort in a query), etc.
The following properties are supported:
Info
A ✅ indicates that the property is required.
name ✅
The name
property sets the name of the field.
Example:
"name": "lastPurchaseDate"
viewable
Whether the field should be viewable on Aurora UI. This field's default value is true
, which enables the field to appear on the front end of Aurora.
Setting the field's value to false
prevents the field from appearing in the Aurora UI. This action overrides any other access permissions for the field set in access/read, access/write, etc.
The viewable
field is handy when your community utilizes background metrics and message analysis. For example, in the case of sentiment analysis, you may want to attach the analysis results to your message on the backend without displaying it to members, moderators, etc.
Example:
"viewable": true
returnable
The returnable
property determines whether the field is returnable or not.
Default Value | Possible Values |
---|---|
true |
true , false |
Example:
"returnable": true
createable
Whether the field can be set when creating a new object of the type the custom field is being defined for.
Default Value | Possible Values |
---|---|
NO |
YES , NO , REQUIRED |
Example:
"createable": "REQUIRED"
editable
The editable
property determines if the field can be set when editing an object of the type the custom field is being defined for.
Default Value | Possible Values |
---|---|
NO |
YES , NO , REQUIRED |
Example:
"editable": "YES"
removable
The removable
property determines if the field can be removed from an object of the type the custom field is being defined for.
Default Value | Possible Values |
---|---|
true |
true , false |
Example:
"removable": false
access
The access
property determines the type of access a caller must have to take specific actions on a custom field.
Includes a read
and write
field, with the following possible values:
PUBLIC
: anyone can take the action.REGISTERED
: the caller must be registered to take the action.PRIVATE
: Only the user who is the primary user for the container, or an administrator, can take the action on the field.ADMINISTRATOR
: The caller must be able to administer the Entity the custom field is set on.
Example:
"access": {
"read": "PRIVATE",
"write": "ADMINISTRATOR"
}
access/read
What access the caller must have to read the custom field.
Default Value | Possible Values |
---|---|
PUBLIC |
PUBLIC , REGISTERED , PRIVATE , ADMINISTRATOR |
Example:
"read": "PRIVATE"
access/write
What access the caller must have to write the custom field.
Default Value | Possible Values |
---|---|
PUBLIC |
PUBLIC , REGISTERED , PRIVATE , ADMINISTRATOR |
Example:
"write": "PRIVATE"
valueDefinition ✅
Complex object which defines properties related to a specific type of value.
These are represented by the CustomFieldValueDefinition GraphQL interface, and are broken up into two groups: Single Values and List Values.
Value Type | Definitions |
---|---|
Single Value |
|
List Value |
|
valueDefinition/valueType ✅
Enumerates the type of value the field will contain (used to determine what GraphQL type to use for the field).
Value Type | Value | Description |
---|---|---|
Single Value | BOOLEAN |
A boolean (true or false). |
Single Value | STRING |
A string. |
Single Value | INT |
An integer (32-bit two's complement integer). |
Single Value | LONG |
A long (64-bit two's complement integer). |
Single Value | FLOAT |
A float (single-precision 32-bit IEEE 754 floating point). |
Single Value | DATETIME |
A long that denotes a point-in-time using the ISO-8601 standard. |
List Value | LIST_STRING |
A list of STRINGs. |
List Value | LIST_INT |
A list of INTs. |
List Value | LIST_FLOAT |
A list of FLOATs. |
Example:
"type": "DATETIME"
valueDefinition/entryValueDefinition ✅
This property is for List Value definitions only.
The Single Value Definition to use for each item in the list.
valueDefinition/minItems
This property is for List Value definitions only.
The minimum number of items allowed in the List.
Default Value: 0
Example:
"minItems": 0
valueDefinition/maxItems
This property is for List Value definitions only.
The maximum number of items allowed in the List.
Default Value: 30
Example:
"maxItems": 10
valueDefinition/defaultValue
This property is for all types except for the BOOLEAN type.
A default value to use for the custom field if it's not set.
- Default Value:
null
Example:
"defaultValue": "Arizona"
valueDefinition/validationRules
This property is for Single Value definitions only.
Validation Rules for the custom field.
Default Value: null
valueDefinition/validationRules/minValue
This property is for INT, FLOAT, LONG, and DATETIME value definitions.
The lowest possible value allowed.
Default Value | Possible Values |
---|---|
null |
|
ATLAS
Comments