docs: added info for sub field types

This commit is contained in:
Stevan Freeborn
2023-04-17 21:36:48 -05:00
parent 0956becaba
commit 501634e246
8 changed files with 219 additions and 0 deletions
@@ -1 +1,25 @@
# Formula Field {% #formula-field %} # Formula Field {% #formula-field %}
Formula fields are a special type of field that can be used to calculate values based on other fields. These fields can have different output types and therefore have the following additional properties in addition to the standard [Field](#fields) properties.
## Formula Field Properties
{% table %}
- Property Name
- Data Type
- Description
---
- outputType
- `string`
- Indicates the type of the output of the formula field. Possible values are: `Text`,`Numeric`, `DateAndTime`, or `ListValue`.
---
- values
- `object[]`
- An array of [List Value](#list-value) objects that define the possible values of the formula field. This array will only be populated with values if the `outputType` is set to `ListValue`.
{% /table %}
@@ -1 +1,34 @@
# The Formula Field Object # The Formula Field Object
{% code heading="FORMULA FIELD" defaultLanguage="json" %}
```json
{
"outputType": "ListValue",
"values": [
{
"id": "b235afb2-b786-4c87-bce9-fbd700e246c1",
"name": "list_value_1",
"sortOrder": 1,
"numericValue": 1,
"color": "#6dcff6"
},
{
"id": "5cd7cd55-d6a6-40e0-a560-8aa407c13210",
"name": "list_value_2",
"sortOrder": 2,
"numericValue": 2,
"color": "#8e468e"
}
],
"id": 4815,
"appId": 130,
"name": "list_formula_field",
"type": "Formula",
"status": "Enabled",
"isRequired": false,
"isUnique": false
}
```
{% /code %}
@@ -1 +1,31 @@
# List Field {% #list-field %} # List Field {% #list-field %}
List fields are a special type of field that allow you to define a list of values that can be selected for the field. These fields have the following additional properties in addition to the standard [Field](#fields) properties.
## List Field Properties
{% table %}
- Property Name
- Data Type
- Description
---
- multiplicity
- `string`
- Indicates whether the field is single or multi select. Possible values are: `MultiSelect` or `SingleSelect`.
---
- listId
- `number`
- The id of the list that the list values are associated with.
---
- values
- `object[]`
- An array of [List Value](#list-value) objects that define the possible values of the list field.
-
@@ -1 +1,35 @@
# The List Field Object # The List Field Object
{% code heading="LIST FIELD" defaultLanguage="json" %}
```json
{
"multiplicity": "MultiSelect",
"listId": 639,
"values": [
{
"id": "71afe161-34f9-49d0-b45e-968b764c884c",
"name": "list_value_1",
"sortOrder": 1,
"numericValue": 1,
"color": "#008e8e"
},
{
"id": "d40a74dd-abb5-4fbb-82c0-5766e871e2a4",
"name": "list_value_2",
"sortOrder": 2,
"numericValue": 2,
"color": "#a186be"
}
],
"id": 4802,
"appId": 130,
"name": "multi_select_list_field",
"type": "List",
"status": "Enabled",
"isRequired": false,
"isUnique": false
}
```
{% /code %}
@@ -1 +1,43 @@
# List Value {% #list-value %} # List Value {% #list-value %}
These are objects that represent the defined values of a [List Field](#list-field) or a [Formula Field](#formula-field) with a `ListValue` output type.
## List Value Properties
{% table %}
- Property Name
- Data Type
- Description
---
- id
- `string`
- The unique id of the list value.
---
- name
- `string`
- The name of the list value.
---
- sortOrder
- `number`
- The sort order of the list value.
---
- numericValue
- `number`
- The numeric value of the list value.
---
- color
- `string`
- The color of the list value.
{% /table %}
@@ -1 +1,15 @@
# The List Value Object # The List Value Object
{% code heading="LIST VALUE" defaultLanguage="json" %}
```json
{
"id": "71afe161-34f9-49d0-b45e-968b764c884c",
"name": "list_value_1",
"sortOrder": 1,
"numericValue": 1,
"color": "#008e8e"
}
```
{% /code %}
@@ -1 +1,25 @@
# Reference Field {% #reference-field %} # Reference Field {% #reference-field %}
Reference fields are a special type of field that allow you to create relationships between one or more content records. These fields identify the app or survey that the related content records are held in therefore they have the following additional properties in addition to the standard [Field](#fields) properties.
## Reference Field Properties
{% table %}
- Property Name
- Data Type
- Description
---
- multiplicity
- `string`
- Indicates whether the field is single or multi select. Possible values are: `MultiSelect` or `SingleSelect`.
---
- referenceAppId
- `number`
- The id of the app that the related content records are held in.
{% /table %}
@@ -1 +1,19 @@
# The Reference Field Object # The Reference Field Object
{% code heading="REFERENCE FIELD" defaultLanguage="json" %}
```json
{
"multiplicity": "MultiSelect",
"referencedAppId": 2,
"id": 4808,
"appId": 130,
"name": "multi_select_reference_field",
"type": "Reference",
"status": "Enabled",
"isRequired": false,
"isUnique": false
}
```
{% /code %}