docs: add field value section for version 1

This commit is contained in:
StevanFreeborn
2023-04-24 14:02:22 -05:00
parent fa20049522
commit 4cfd6fd792
3 changed files with 428 additions and 3 deletions
@@ -0,0 +1,319 @@
# Field Values {% #field-values %}
These are objects representing a field value in a record. They will comprise the `fieldData` array in a [Record](#records) object. The `type` property will determine what the type and structure of the `value` property will be.
## Field Value Properties
{% table %}
- Property Name
- Data Type
- Description
---
- Type
- `number`
- The type of the field.
---
- FieldId
- `number`
- The id of the field.
---
- Value
- `object`
- The value of the field.
{% /table %}
### Field Value Types
{% table %}
- Type
- Description
- Value Data Type
---
- 0
- A string value.
- `string`
---
- 1
- An integer value.
- `number`
---
- 2
- A decimal value.
- `number`
---
- 3
- A date value.
- `string`
---
- 4
- A [Time Span](#time-span-field-value) value.
- `object`
---
- 5
- A GUID value.
- `string`
---
- 10
- A list of string values.
- `string[]`
---
- 11
- A list of integer values.
- `number[]`
---
- 15
- A list of GUID values.
- `string[]`
---
- 16
- A list of [Attachment](#attachment-field-value) values.
- `object[]`
---
- 17
- A list of [Scoring Group](#scoring-group-field-value) values.
- `object[]`
{% /table %}
### Time Span Field Value {% #time-field-span-value %}
{% table %}
- Property Name
- Data Type
- Description
---
- Quantity
- `number`
- The number of the specified increment.
---
- Increment
- `number`
- The increment of time. Can be one of the following values: `128`, `64`, `32`, `16`, `8`, `4`, `2`.
---
- Recurrence
- `number`
- The recurrence of the time span. Can be one of the following values: `0`, `1`, `2`.
---
- EndByDate
- `string`
- The end date of the time span. This will only be set if `recurrence` is set to `1`.
---
- EndAfterOccurrences
- `number`
- The number of occurrences of the time span. This will only be set if `recurrence` is set to `2`.
{% /table %}
#### Increment Types
{% table %}
- Type Value
- Description
---
- 2
- Seconds
---
- 4
- Minutes
---
- 8
- Hours
---
- 16
- Days
---
- 32
- Weeks
---
- 64
- Months
---
- 128
- Years
{% /table %}
#### Recurrence Types
{% table %}
- Type Value
- Description
---
- 0
- None
---
- 1
- EndByDate
---
- 2
- EndAfterOccurrences
{% /table %}
### Attachment Field Value {% #attachment-field-value %}
{% table %}
- Property Name
- Data Type
- Description
---
- FileId
- `number`
- The id of the file.
---
- FileName
- `string`
- The name of the file.
---
- Notes
- `string`
- The notes for the attachment.
---
- StorageLocation
- `number`
- The storage location of the file. Can be one of the following values: `0`, `1`, `2`.
---
- DownloadLink
- `string`
- The download link for the file. This will only be returned if the `storageLocation` is not `Internal`.
---
- QuickEditLink
- `string`
- The quick edit link for the file. This will only be returned if the `storageLocation` is not `Internal`.
{% /table %}
#### Storage Location Types
{% table %}
- Type Value
- Description
---
- 0
- Internal
---
- 1
- OneDrive
---
- 2
- Google Drive
{% /table %}
### Scoring Group Field Value {% #scoring-group-field-value %}
{% table %}
- Property Name
- Data Type
- Description
---
- ListValueId
- `string`
- The id of the list value.
---
- Name
- `string`
- The name of the scoring group.
---
- Score
- `number`
- The score of the scoring group.
---
- MaximumScore
- `number`
- The maximum score of the scoring group.
{% /table %}
@@ -0,0 +1,100 @@
# The Field Value Object
The following snippet contains an example of field value objects for each of the possible field value types.
{% code heading="FIELD VALUES" defaultLanguage="json" %}
```json
{
"Type": 1,
"FieldId": 6976,
"Value": 1
},
{
"Type": 3,
"FieldId": 4746,
"Value": "2023-02-16T05:14:14Z"
},
{
"Type": 0,
"FieldId": 4753,
"Value": "test@test.com"
},
{
"Type": 2,
"FieldId": 4756,
"Value": 15.3
},
{
"Type": 17,
"FieldId": 4762,
"Value": [
{
"listValueId": "c9e4d695-184c-48ec-a8ef-01a52b2bce39",
"name": "scoring_group_list_1",
"score": 5,
"maximumScore": 6
},
]
},
{
"Type": 11,
"FieldId": 4792,
"Value": [
1,
2,
]
},
{
"Type": 5,
"FieldId": 4801,
"Value": "2c1af5b1-0f90-4378-b9a5-8b7e22f2bc84"
},
{
"Type": 15,
"FieldId": 4802,
"Value": [
"71afe161-34f9-49d0-b45e-968b764c884c",
"d40a74dd-abb5-4fbb-82c0-5766e871e2a4"
]
},
{
"Type": 16,
"FieldId": 4806,
"Value": [
{
"fileId": 909,
"fileName": "test-attachment.txt",
"notes": "This is a test",
"storageLocation": "Internal"
},
]
},
{
"Type": 4,
"FieldId": 4811,
"Value": {
"quantity": 10,
"increment": "Minutes",
"recurrence": "None"
}
},
{
"Type": 10,
"FieldId": 4999,
"Value": [
"list_value_1",
"list_value_2"
]
},
{
"Type": 11,
"FieldId": 4807,
"Value": [
910,
911,
]
}
```
{% /code %}
@@ -130,7 +130,7 @@ These are objects representing a field value in a record. They will comprise the
- increment - increment
- `string` - `string`
- The increment of time. Can be one of the following values: `Years`, `Months`, `Days`, `Hours`, `Minutes`, `Seconds`. - The increment of time. Can be one of the following values: `Years`, `Months`, `Weeks`, `Days`, `Hours`, `Minutes`, `Seconds`.
--- ---
@@ -142,13 +142,13 @@ These are objects representing a field value in a record. They will comprise the
- endByDate - endByDate
- `string` - `string`
- The end date of the time span. This will only be returned if `recurrence` is set to `EndByDate`. - The end date of the time span. This will only be set if `recurrence` is set to `EndByDate`.
--- ---
- endAfterOccurrences - endAfterOccurrences
- `number` - `number`
- The number of occurrences of the time span. This will only be returned if `recurrence` is set to `EndAfterOccurrences`. - The number of occurrences of the time span. This will only be set if `recurrence` is set to `EndAfterOccurrences`.
{% /table %} {% /table %}
@@ -190,6 +190,12 @@ These are objects representing a field value in a record. They will comprise the
- `string` - `string`
- The download link for the file. This will only be returned if the `storageLocation` is not `Internal`. - The download link for the file. This will only be returned if the `storageLocation` is not `Internal`.
---
- quickEditLink
- `string`
- The quick edit link for the file. This will only be returned if the `storageLocation` is not `Internal`.
{% /table %} {% /table %}
### Scoring Group Field Value {% #scoring-group-field-value %} ### Scoring Group Field Value {% #scoring-group-field-value %}