docs: begin working on fields section
This commit is contained in:
@@ -57,6 +57,34 @@ export const versionOne: DocsStructure = {
|
|||||||
example: 'example.md',
|
example: 'example.md',
|
||||||
children: [],
|
children: [],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: 'Reports',
|
||||||
|
folder: 'reports',
|
||||||
|
copy: 'copy.md',
|
||||||
|
example: 'example.md',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
title: 'Report Data',
|
||||||
|
folder: 'report_data',
|
||||||
|
copy: 'copy.md',
|
||||||
|
example: 'example.md',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: 'Fields',
|
||||||
|
folder: 'fields',
|
||||||
|
copy: 'copy.md',
|
||||||
|
example: 'example.md',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
title: 'Formula Field',
|
||||||
|
folder: 'formula_field',
|
||||||
|
copy: 'copy.md',
|
||||||
|
example: 'example.md',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -0,0 +1,153 @@
|
|||||||
|
# Fields {% #fields %}
|
||||||
|
|
||||||
|
These are objects representing a field in an app or survey in your instance. You can retrieve a list of fields in an app or survey or retrieve a specific field to see the properties of the field(s).
|
||||||
|
|
||||||
|
## Field Properties
|
||||||
|
|
||||||
|
{% table %}
|
||||||
|
|
||||||
|
- Property Name
|
||||||
|
- Data Type
|
||||||
|
- Description
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- Id
|
||||||
|
- `number`
|
||||||
|
- The id of the field.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- AppId
|
||||||
|
- `number`
|
||||||
|
- The id of the app or survey.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- Name
|
||||||
|
- `string`
|
||||||
|
- The name of the field.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- Type
|
||||||
|
- `number`
|
||||||
|
- The type of the field. Possible values are: `100`, `200`, `204`, `300`, `307`, `400`, `500`, `502`, `600`, `601`, `602`, `800`, `801`, or `900`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- Status
|
||||||
|
- `number`
|
||||||
|
- The status of the field. Possible values are: `0` or `1`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- IsRequired
|
||||||
|
- `boolean`
|
||||||
|
- Indicates whether the field is configured to be required.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- IsUnique
|
||||||
|
- `boolean`
|
||||||
|
- Indicates whether the field is configured to be unique.
|
||||||
|
|
||||||
|
{% /table %}
|
||||||
|
|
||||||
|
### Field Types
|
||||||
|
|
||||||
|
{% table %}
|
||||||
|
|
||||||
|
- Type Value
|
||||||
|
- Description
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- 100
|
||||||
|
- Attachment Field
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- 200
|
||||||
|
- Number Field
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- 204
|
||||||
|
- Auto Number Field
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- 300
|
||||||
|
- Date/Time Field
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- 307
|
||||||
|
- Time Span Field
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- 400
|
||||||
|
- List Field
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- 500
|
||||||
|
- Reference or Parallel Reference Field
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- 502
|
||||||
|
- Survey Reference Field
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- 600
|
||||||
|
- Survey Scoring Group Field
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- 601
|
||||||
|
- Survey Campaign Field
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- 602
|
||||||
|
- Survey Unified Answer Field
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- 800
|
||||||
|
- Attachment Field
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- 801
|
||||||
|
- Image Field
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- 900
|
||||||
|
- Formula Field
|
||||||
|
|
||||||
|
{% /table %}
|
||||||
|
|
||||||
|
### Field Statuses
|
||||||
|
|
||||||
|
{% table %}
|
||||||
|
|
||||||
|
- Status Value
|
||||||
|
- Description
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- 0
|
||||||
|
- Enabled
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- 1
|
||||||
|
- Disabled
|
||||||
|
|
||||||
|
{% /table %}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
# The Field Object
|
||||||
|
|
||||||
|
{% code heading="FIELD" defaultLanguage="json" %}
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Id": 6983,
|
||||||
|
"AppId": 195,
|
||||||
|
"Name": "Name",
|
||||||
|
"Type": 100,
|
||||||
|
"Status": 0,
|
||||||
|
"IsRequired": false,
|
||||||
|
"IsUnique": false
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
{% /code %}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
# 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
|
||||||
|
- `number`
|
||||||
|
- Indicates the type of the output of the formula field. Possible values are: `0`,`1`, `2`, or `3`.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- values
|
||||||
|
- `object[]`
|
||||||
|
- An array of [List Value](#list-values) 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 %}
|
||||||
|
|
||||||
|
### Formula Field Output Types
|
||||||
|
|
||||||
|
{% table %}
|
||||||
|
|
||||||
|
- Output Type Value
|
||||||
|
- Output Type Description
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- 0
|
||||||
|
- Text
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- 1
|
||||||
|
- Numeric
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- 2
|
||||||
|
- Date/Time
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- 3
|
||||||
|
- List Value
|
||||||
|
|
||||||
|
{% /table %}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
# Reports {% #reports %}
|
||||||
|
|
||||||
|
These are objects that represent reports and their data for apps and surveys in an Onspring instance. You can retrieve a list of reports for an app or survey, or get a specific report's data.
|
||||||
|
|
||||||
|
## Report Properties
|
||||||
|
|
||||||
|
{% table %}
|
||||||
|
|
||||||
|
- Property Name
|
||||||
|
- Data Type
|
||||||
|
- Description
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- AppId
|
||||||
|
- `number`
|
||||||
|
- The id of the app or survey that the report belongs to.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- Id
|
||||||
|
- `number`
|
||||||
|
- The id of the report.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- Name
|
||||||
|
- `string`
|
||||||
|
- The name of the report.
|
||||||
|
|
||||||
|
{% /table %}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
# The Report Object
|
||||||
|
|
||||||
|
{% code heading="REPORT" defaultLanguage="json" %}
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"AppId": 195,
|
||||||
|
"Id": 613,
|
||||||
|
"Name": "Test 1"
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
{% /code %}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# Report Data {% #report-data %}
|
||||||
|
|
||||||
|
These are objects that represent the data for a report in an Onspring instance. They will be returned when you request a specific report by id.
|
||||||
|
|
||||||
|
## Report Data Properties {% #reports-data-properties %}
|
||||||
|
|
||||||
|
{% table %}
|
||||||
|
|
||||||
|
- Property Name
|
||||||
|
- Data Type
|
||||||
|
- Description
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- Columns
|
||||||
|
- `string[]`
|
||||||
|
- The names of the [fields](#fields) in the report.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
- Rows
|
||||||
|
- `object[][]`
|
||||||
|
- The data for each row in the report.
|
||||||
|
|
||||||
|
{% /table %}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
# The Report Data Object
|
||||||
|
|
||||||
|
{% code heading="REPORT DATA" defaultLanguage="json" %}
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"Columns": [
|
||||||
|
"Name",
|
||||||
|
"Owner",
|
||||||
|
"Due Date",
|
||||||
|
"Status",
|
||||||
|
"Description"
|
||||||
|
],
|
||||||
|
"Rows": [
|
||||||
|
[
|
||||||
|
"A New Test Task",
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
null,
|
||||||
|
"<p>This is a test task.</p>"
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
{% /code %}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
# Reports {% #reports %}
|
# Reports {% #reports %}
|
||||||
|
|
||||||
These are objects that represent reports and their data for apps and surveys in an Onspring instance. You can retrieve a list of reports for an app or survey, or get a specific report and its data.
|
These are objects that represent reports and their data for apps and surveys in an Onspring instance. You can retrieve a list of reports for an app or survey, or get a specific report's data.
|
||||||
|
|
||||||
## Report Properties
|
## Report Properties
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user