Data / Find screens
Task in alpha phase
This Data Factory task is in phase. You can contact the Product-Live team at contact@product-live.com if you want more details and get an early access.
This task allows to find screens. A screen defines which fields and columns are visible and in what order they appear when viewing items in a table. Screens are used to customize the display of data for different use cases.
Task name:
Examples
json
{
"name": "data-screen-find",
"taskReferenceName": "find_screens",
"description": "Find all screens for a table",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"findMode": "ALL",
"request": {
"method": "INLINE",
"contentType": "application/json",
"model": "default",
"json": {
"context": {
"tableId": "1470"
},
"options": {
"limit": 100
}
}
}
}
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
json
{
"name": "data-screen-find",
"taskReferenceName": "find_screens",
"description": "Find a screen by key",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"findMode": "REQUEST",
"request": {
"method": "INLINE",
"contentType": "application/json",
"model": "default",
"json": {
"context": {
"tableId": "1470"
},
"criteria": {
"type": "eq",
"field": "key",
"value": "ALL_COLUMNS"
}
}
}
}
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Definition
| Property | Type | Required | Description |
|---|---|---|---|
| The name (or type) of the task | |||
| The unique name of the task in your job. It is used to reference this task in the workflow. | |||
| The functional description of this task in your job. | |||
The type of the task. It must be SUB_WORKFLOW. | |||
| : | true: the job continues if there is an error on this task. false: the job fails. | ||
| Input parameters of the task. See below |
Inputs Parameters
| Property | Type | Required | Description |
|---|---|---|---|
| The Product-Live API key If not provided, an automaticaly generated API key will be used to perform the request on behalf of the current user. If provided, the given API key will be used to perform the request. | |||
ALL: Fetch all elements. REQUEST: Fetch all elements matching certain criteria. | |||
| See below | |||
To day, application/json and application/xml are supported. | |||
INLINE: The request body is provided inline in the request object. ATTACHMENT: The request body is provided as an attachment in the request object. | |||
If method == INLINE and contentType == application/json | The request body as a JSON object. | ||
The options of the request. Available options are: limit, sort, sortOrder. | |||
| The maximum number of elements to be returned by the task. If not set, the task returns the maximum number of elements available. If the limit property is less than the maximum number of elements that can be returned, the task returns the number of elements specified by the limit property. | |||
| The field to sort the elements by. | |||
The order to sort the elements by. Available orders are: ASC, DESC. | |||
| The criteria of the request. See examples below | |||
If request.method == ATTACHMENT | The request body as a file. | ||
Default: API. The model/format used in the request. To day, only 'API' is supported. | |||
Default: [{"mediaType": "application/json", "outputMode": "INLINE", "outputKey": "json"}]. | |||
The media type of the output. To day, application/json and application/xml are supported. | |||
INLINE: The output is provided inline in the output object. ATTACHMENT: The output is provided as an attachment in the output object. INLINE is only supported for mediaType=application/json | |||
| The key of the output. Either json or xml | |||
Default: DEFAULT. The model/format used in the output. To day, only 'DEFAULT' is supported. |
Context requirements
| Property | Type | Required | Description |
|---|---|---|---|
| The ID of the table to search screens in | |||
| The ID of a partner account to access shared table screens |
JSON criteria examples
json
{
"context": {
"tableId": "1470"
},
"criteria": {
"type": "eq",
"field": "key",
"value": "ALL_COLUMNS"
}
}1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
json
{
"context": {
"tableId": "1470"
},
"criteria": {
"type": "search",
"caseSensitive": false,
"field": "title",
"value": "Export"
}
}1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
json
{
"context": {
"tableId": "1470"
},
"criteria": {
"type": "eq",
"field": "levelId",
"value": "1234"
}
}1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
json
{
"context": {
"tableId": "1470"
},
"options": {
"sort": "position",
"sortOrder": "ASC",
"limit": 50
}
}1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
XML criteria examples
xml
<?xml version="1.0" encoding="UTF-8"?>
<map xmlns="http://www.w3.org/2005/xpath-functions">
<map key="context">
<string key="tableId">1470</string>
</map>
<map key="criteria">
<string key="field">key</string>
<string key="type">eq</string>
<string key="value">ALL_COLUMNS</string>
</map>
</map>1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
xml
<?xml version="1.0" encoding="UTF-8"?>
<map xmlns="http://www.w3.org/2005/xpath-functions">
<map key="context">
<string key="tableId">1470</string>
</map>
<map key="options">
<string key="sort">position</string>
<string key="sortOrder">asc</string>
<string key="limit">50</string>
</map>
</map>1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
Outputs
| Property | Type | Description |
|---|---|---|
| The total number of elements exported by the task | ||
An object containing the result of the task. Each output key is the key of the output defined in the outputs[].outputKey input parameter. |
Json output - outputs[].outputMode=INLINE and outputs[].mediaType=application/json
output.jsonis an array of objects as defined in the screens API.jsonis the default output key but may be changed by setting theoutputKeyproperty.
Example output:
json
[
{
"object": "screen",
"id": "7421",
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-01-15T10:30:00.000Z",
"key": "ALL_COLUMNS",
"tableId": "1470",
"levelId": "1234",
"position": 1,
"title": "All Columns",
"titleLocal": {},
"description": "Display all columns",
"descriptionLocal": {}
}
]1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
XML output - outputs[].outputMode=ATTACHMENT and outputs[].mediaType=application/xml
Example output:
xml
<?xml version="1.0" encoding="UTF-8"?>
<array xmlns="http://www.w3.org/2005/xpath-functions">
<map>
<string key="object">screen</string>
<string key="id">7421</string>
<string key="createdAt">2024-01-15T10:30:00.000Z</string>
<string key="updatedAt">2024-01-15T10:30:00.000Z</string>
<string key="key">ALL_COLUMNS</string>
<string key="tableId">1470</string>
<string key="levelId">1234</string>
<number key="position">1</number>
<string key="title">All Columns</string>
<map key="titleLocal"></map>
<string key="description">Display all columns</string>
<map key="descriptionLocal"></map>
</map>
</array>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Limits and additional notes
- When the
outputMode=INLINEis selected, the maximum number of elements returned by this task is limited to1000. If more elements are to be returned, the task ends with an error. To export up to the maximum of elements, use thelimitinput parameter to limit the number of elements return.
Additional examples
Find screens from a partner's shared table
job.json
json
{
"name": "data-screen-find",
"taskReferenceName": "find_partner_screens",
"description": "Find screens from a partner's shared table",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"findMode": "REQUEST",
"request": {
"method": "INLINE",
"contentType": "application/json",
"model": "default",
"json": {
"context": {
"accountId": "${workflow.input.partnerAccountId}",
"tableId": "${workflow.input.tableId}"
},
"criteria": {
"type": "eq",
"field": "key",
"value": "ALL_COLUMNS"
}
}
}
}
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Find screens with XML output
job.json
json
{
"name": "data-screen-find",
"taskReferenceName": "find_screens",
"description": "Find all screens with XML output",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"findMode": "ALL",
"request": {
"method": "INLINE",
"contentType": "application/json",
"model": "default",
"json": {
"context": {
"tableId": "1470"
},
"options": {
"limit": 100
}
}
},
"outputs": [
{
"mediaType": "application/xml",
"outputMode": "ATTACHMENT",
"outputKey": "xml"
}
]
}
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30