Data / Find items
Task in alpha phase
This Data Factory task is in phase: it is available on every account, and we keep improving it. Share your feedback with the Product-Live team at contact@product-live.com.
This task allows to find items. Items are the individual records/rows in a table, representing products or other entities.
Task name:
Examples
json
{
"name": "data-item-find",
"taskReferenceName": "find_items",
"description": "Find items by their IDs",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"findMode": "REQUEST",
"request": {
"method": "INLINE",
"contentType": "application/json",
"model": "default",
"json": {
"context": {
"partitionId": "2342"
},
"criteria": {
"type": "in",
"field": "id",
"value": ["123456", "789012"]
}
}
}
}
}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
json
{
"name": "data-item-find",
"taskReferenceName": "find_items",
"description": "Find items in a partition referenced by its business keys",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"findMode": "REQUEST",
"request": {
"method": "INLINE",
"contentType": "application/json",
"model": "default",
"json": {
"context": {
"tableKey": "PRODUCTS",
"partitionKey": "ACTIVES"
},
"criteria": {
"type": "in",
"field": "id",
"value": ["123456", "789012"]
}
}
}
}
}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
json
{
"name": "data-item-find",
"taskReferenceName": "find_items",
"description": "Find items by EAN code",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"findMode": "REQUEST",
"request": {
"method": "INLINE",
"contentType": "application/json",
"model": "default",
"json": {
"context": {
"partitionId": "2342"
},
"criteria": {
"type": "eq",
"caseSensitive": true,
"field": {
"target": "item.fields",
"key": "EAN_13"
},
"value": "3838782464300"
}
}
}
}
}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
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
json
{
"name": "data-item-find",
"taskReferenceName": "find_all_items_in_partition",
"description": "Find every item in a single partition",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"findMode": "ALL",
"request": {
"method": "INLINE",
"contentType": "application/json",
"model": "default",
"json": {
"context": {
"partitionId": "2342"
},
"options": {
"limit": 500
}
}
}
}
}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-item-find",
"taskReferenceName": "find_items_in_table",
"description": "Find items matching a list of EANs across every partition of the PRODUCTS table",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"findMode": "REQUEST",
"findOptions": {
"partitionSelection": "TABLE",
"tableKey": "PRODUCTS"
},
"request": {
"method": "INLINE",
"contentType": "application/json",
"model": "default",
"json": {
"criteria": {
"type": "in",
"field": {
"target": "item.fields",
"key": "EAN_13"
},
"value": ["8003437047848", "5011546052536"]
}
}
}
}
}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
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
json
{
"name": "data-item-find",
"taskReferenceName": "find_items_all_partitions",
"description": "Find items by EAN across every partition of the account",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"findMode": "REQUEST",
"findOptions": {
"partitionSelection": "ALL"
},
"request": {
"method": "INLINE",
"contentType": "application/json",
"model": "default",
"json": {
"criteria": {
"type": "eq",
"caseSensitive": true,
"field": {
"target": "item.fields",
"key": "EAN_13"
},
"value": "3838782464300"
}
}
}
}
}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
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
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 automatically 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 | |||
Today, 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. | |||
| 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 | |||
| Resolves business keys into ids before the request is sent, so the request can be written without hardcoding ids. See the Lookups reference. | |||
If request.method == ATTACHMENT | The request body as a file. | ||
| The model/format used in the request. Today, only default is supported. | |||
Default: [{"mediaType": "application/json", "outputMode": "INLINE", "outputKey": "json"}]. | |||
The media type of the output. Today, 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. Today, only default is supported. | |||
Number of elements fetched per page when results are retrieved in a paginated way. Default: 200. Maximum: 1000 (values above are clamped). |
Specific input parameters
| Property | Type | Required | Description |
|---|---|---|---|
The context of the request. Must use either form A (partitionId) or form B (tableKey + partitionKey); the two forms are mutually exclusive and mixing technical ids with business keys is rejected. | |||
Form A - by id. The id of the partition to find items in. Mutually exclusive with tableKey and partitionKey. | |||
The id of the level to read. A table with more than one level refuses a read that does not say which level it means, and answers 400. Ignored on a single-level table. See Multi-level tables. | |||
USER_SELECTION only, and an override. That mode builds its own request from the launch context, so request.json.context never reaches it. The task resolves the level itself, from the screen the user launched from, and this input is only for a caller that already knows better. With REQUEST or ALL, set the level in request.json.context.levelId instead. | |||
Form B - by business keys. The business key of the table that owns the target partition. Must be paired with partitionKey. The task resolves the table key and the partition key into the corresponding ids before running the find. Mutually exclusive with partitionId. | |||
Form B - by business keys. The business key of the partition to find items in. Must be paired with tableKey. Mutually exclusive with partitionId. | |||
Optional request-level options forwarded to the underlying items API (sort, sortOrder, limit, includedFieldKeys, ...). limit caps the number of items read, and totalElements is then the number of items read. Ignored with findMode: "USER_SELECTION", which builds its own request: see Read only some fields of the grid selection. | |||
A whitelist of root field keys to include in each returned item's fields[]. When omitted, all fields are returned (legacy behaviour). An empty array is dropped from the request, so every field is returned as well: when the list is computed, make sure it is not empty. Unknown keys are silently ignored. Root metadata (id, itemMetadata, createdAt, updatedAt, parent, children) is always preserved. Forwarded as repeated query parameters to the items API. The same option can be supplied via an XML request body (see XML example below). | |||
| A list of options for the find operation. | |||
Controls the partition scope of the search.DEFAULT: search the single partition identified by request.json.context.partitionId (or by tableKey + partitionKey).TABLE: search every partition of the single table designated by findOptions.tableKey.LIST: search an explicit set of partitions, designated by findOptions.partitionIds or by findOptions.tableKey + findOptions.partitionKeys.ALL: search every partition of the account, across all its tables.With TABLE, LIST and ALL, the partition scope lives entirely in findOptions: request.json.context must not designate a partition (see the mutual-exclusivity note below). | |||
The business key of the table to search. Required by partitionSelection: "TABLE", where it is the only input needed. Also required by partitionSelection: "LIST" when the partitions are designated by partitionKeys (it scopes the key resolution to one table). Forbidden with partitionIds. | |||
LIST only. The business keys of the partitions to search, within findOptions.tableKey. Non-empty, at most 1000 entries, duplicates removed. Every key must exist, otherwise the task fails and names the missing ones. Mutually exclusive with partitionIds, and forbidden with partitionSelection: "TABLE". | |||
LIST only. The ids of the partitions to search. Non-empty, at most 1000 entries, duplicates removed. Mutually exclusive with partitionKeys and with tableKey, and forbidden with partitionSelection: "TABLE". |
Multi-level tables
A table can have several levels: a clothing catalogue may hold a model, its colourways, and the sizes of each colourway. An item then belongs to exactly one level, and a read has to say which one.
A find without levelId on such a table fails with 400. It is not a default, not a guess, and not the first level: the API refuses the read. On a single-level table the parameter is ignored, so it is always safe to send.
json
{
"request": {
"method": "INLINE",
"contentType": "application/json",
"json": {
"context": {
"partitionId": "21023",
"levelId": "14490"
},
"criteria": { "field": "id", "type": "in", "value": ["15280112", "15280115"] }
}
}
}1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
Read the level ids with Find levels. A screen belongs to one level and carries its levelId, so a job launched from a screen can resolve the level it is looking at with Find screens.
What comes back. An item of a child level carries its own fields, and its ancestors under parent, which is itself an item with its own fields and its own parent. A size therefore carries its colourway and, through it, its model: a value that lives on the model is reachable from the size without a second read.
With findMode: "USER_SELECTION", you have nothing to do. The request is built by the task from what the user selected in the grid, so request.json.context never reaches it. The launch context names the screen but not its level, so the task reads the screens of the table and takes the level of the one the job was launched from: a screen belongs to exactly one level, and the gesture has already decided it. That read costs one lookup per run. Pass the levelId input only to override it. That mode does not forward request.json.options: includedFieldKeys and limit are ignored, and every field of every selected item is read. To read only some fields, or a capped number of items, of the grid selection, use REQUEST with the launch context, as shown in Read only some fields of the grid selection.
Find mode and partition selection
Items are scoped to a partition, so two parameters together define what is fetched and where the task looks for it:
findModecontrols the matching strategy:REQUEST- only items matchingrequest.json.criteriaare returned.ALL- every item is returned, subject torequest.json.options.limit. Nocriteriais needed.USER_SELECTION- the items selected in the grid the job was launched from. The task builds the request itself from the launch context (partition, level of the launch screen and selection), sorequest.jsonand itsoptionsare ignored.
findOptions.partitionSelectioncontrols the partition scope:DEFAULT(or unset) - search a single partition. It is designated either by its id, inrequest.json.context.partitionId, or by its business keys, withrequest.json.context.tableKey+request.json.context.partitionKey.TABLE- search every partition of one table, designated byfindOptions.tableKeyalone. The task resolves the table key into its id, lists that table's partitions, runs the find for each one and merges the results.LIST- search an explicit set of partitions, designated byfindOptions.partitionIds(ids) or byfindOptions.tableKey+findOptions.partitionKeys(business keys).ALL- search every partition of the account, across all of its tables.
In the three multi-partition modes the request context no longer designates a partition: the scope lives entirely in findOptions. The two parameters can then be combined freely:
findMode | findOptions.partitionSelection | Items returned |
|---|---|---|
REQUEST | DEFAULT | Items matching criteria in the partition partitionId. |
ALL | DEFAULT | Every item in the partition partitionId. |
REQUEST | TABLE | Items matching criteria across every partition of the table tableKey. |
ALL | TABLE | Every item of the table tableKey. |
REQUEST | LIST | Items matching criteria across the listed partitions. |
ALL | LIST | Every item of the listed partitions. |
REQUEST | ALL | Items matching criteria across every partition of the account. |
ALL | ALL | Every item across every partition of the account. |
Choosing a partition scope
The three multi-partition modes work the same way and differ only in which partitions end up in the set. Each one first resolves a set of partitions, then runs your request unchanged once per partition, then merges everything into a single result: totalElements is the sum over the partitions, and result.json holds the matching items from all of them, with nothing indicating which partition each item came from. The find is not a single query over several partitions - it is one query per partition - so the cost of the task grows with the size of the set, and a partition that fails to answer fails the whole task.
What separates the modes is therefore how the set is built, which decides both how much gets scanned and how much the caller has to know before calling:
| Your situation | Use | Why not the others |
|---|---|---|
| You know the table and want all of it, without caring how many partitions it has | TABLE with tableKey | LIST would force you to enumerate the partitions yourself, and to keep that list up to date as partitions are added or renamed. ALL would additionally scan every other table of the account for nothing. |
| You want a specific subset - one partition, or a few named ones | LIST with partitionKeys or partitionIds | TABLE always takes the whole table. It cannot be narrowed: adding partitionKeys or partitionIds to a TABLE call is rejected rather than applied, precisely so that a request meant for one partition never turns into a silent full-table scan. Switch the mode, don't add a filter. |
| You don't know which table the items live in | ALL | Broadest and slowest: it lists every table of the account, then every partition of each. Prefer TABLE as soon as you can name the table. |
Example - the same list of EANs, across the whole PRODUCTS table:
json
{
"findMode": "REQUEST",
"findOptions": {
"partitionSelection": "TABLE",
"tableKey": "PRODUCTS"
},
"request": {
"method": "INLINE",
"contentType": "application/json",
"model": "default",
"json": {
"criteria": {
"type": "in",
"field": {
"target": "item.fields",
"key": "EAN_13"
},
"value": ["8003437047848", "5011546052536"]
}
}
}
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Each partition of PRODUCTS is searched with that same criteria, and the matches are merged: totalElements is the sum over the partitions, and result.json contains the matching items regardless of which partition each one lives in.
WARNING
request.json.context must not designate a partition in TABLE, LIST or ALL mode. Supplying partitionId, partitionKey, tableKey or tableId there fails the task with findOptions.partitionSelection: "..." is mutually exclusive with request.json.context.{...}, rather than silently picking one of the two scopes. In TABLE mode the table key goes in findOptions.tableKey, never in the request context.
WARNING
TABLE and LIST iterate over at most 1000 partitions per execution. ALL is capped lower: at most 100 tables, and at most 100 partitions per table.
TABLE refuses rather than guesses at both ends of that range: a table with no partition at all fails instead of returning an empty result, and a table that reaches the 1000-partition ceiling fails instead of scanning a silently truncated subset. Use LIST with explicit partitionKeys to work through such a table in bounded batches.
Field targeting
When searching for items, you can target item field values using a special field object syntax instead of a simple string:
| Property | Type | Required | Description |
|---|---|---|---|
Must be item.fields to target item field values | |||
The key of the field to search (e.g. EAN_13, TITLE, BRAND) |
Example - Search by EAN code:
json
{
"criteria": {
"type": "eq",
"caseSensitive": true,
"field": {
"target": "item.fields",
"key": "EAN_13"
},
"value": "3838782464300"
}
}1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
Example - Search items containing text in title:
json
{
"criteria": {
"type": "search",
"caseSensitive": false,
"field": {
"target": "item.fields",
"key": "TITLE"
},
"value": "organic"
}
}1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
JSON criteria examples
TIP
The full list of searchable fields and supported operators is documented in the Find request body - Items reference.
json
{
"context": {
"partitionId": "2342"
},
"criteria": {
"type": "eq",
"field": "id",
"value": "80303"
}
}1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
json
{
"context": {
"partitionId": "2342"
},
"criteria": {
"type": "in",
"field": "id",
"value": ["80303", "80304", "80305"]
}
}1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10
json
{
"context": {
"partitionId": "2342"
},
"criteria": {
"type": "eq",
"caseSensitive": true,
"field": {
"target": "item.fields",
"key": "EAN_13"
},
"value": "3838782464300"
}
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14
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="partitionId">2342</string>
</map>
<map key="criteria">
<string key="field">id</string>
<string key="type">eq</string>
<string key="value">80303</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="tableKey">PRODUCTS</string>
<string key="partitionKey">ACTIVES</string>
</map>
<map key="criteria">
<string key="field">id</string>
<string key="type">eq</string>
<string key="value">80303</string>
</map>
</map>1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
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=application/json
result.jsonis an array of objects as defined in the items API.jsonis the default output key but may be changed by setting theoutputKeyproperty.
json
{
"totalElements": 1,
"result": {
"json": [
{
"object": "item",
"id": "1",
"updatedAt": "2022-05-13T07:54:59.000Z",
"createdAt": "2022-05-13T07:54:55.000Z",
"fields": [
{
"value": {
"data": "1234567890123"
},
"type": "IDENTIFIER",
"key": "EAN_13"
},
{
"key": "TITLE_EN",
"type": "SINGLE-LINE-TEXT",
"value": {
"data": "My title"
}
}
],
"itemMetadata": {
"createdAt": "2025-11-18T10:00:00.000Z",
"updatedAt": "2025-11-18T10:00:00.000Z",
"tableId": "1",
"tableKey": "1",
"tableOwnerAccountId": "1",
"levelId": "1",
"levelKey": "1",
"partitionId": "1"
}
}
]
}
}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
31
32
33
34
35
36
37
38
39
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
31
32
33
34
35
36
37
38
39
XML output - outputs[].outputMode=application/xml
result.xmlis an array of objects as defined in the items API.xmlis the default output key but may be changed by setting theoutputKeyproperty.
xml
<?xml version="1.1" encoding="UTF-8"?>
<map xmlns="http://www.w3.org/2005/xpath-functions">
<array key="operations">
<map>
<string key="key">item-0</string>
<map key="response">
<string key="object">item</string>
<string key="id">1</string>
<string key="updatedAt">2025-11-04T15:26:00.000Z</string>
<string key="createdAt">2025-11-04T15:26:00.000Z</string>
<array key="fields">
<map>
<map key="value">
<string key="data">1234567890123</string>
</map>
<string key="type">IDENTIFIER</string>
<string key="key">EAN_13</string>
</map>
<map>
<string key="key">TITLE_EN</string>
<string key="type">SINGLE-LINE-TEXT</string>
<map key="value">
<string key="data">My title</string>
</map>
</map>
</array>
<map key="itemMetadata">
<string key="createdAt">2025-11-18T10:00:00.000Z</string>
<string key="updatedAt">2025-11-18T10:00:00.000Z</string>
<string key="tableId">1</string>
<string key="tableKey">1</string>
<string key="tableOwnerAccountId">1</string>
<string key="levelId">1</string>
<string key="levelKey">1</string>
<string key="partitionId">1</string>
</map>
</map>
</map>
</array>
</map>
</map>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
31
32
33
34
35
36
37
38
39
40
41
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
31
32
33
34
35
36
37
38
39
40
41
- The default format follow the W3C
JSON-to-XMLfunction. - To be noted:
- Illegal characters are escaped (replaced with numeric character references).
- When a json object presents a duplicate key, the first value is kept.
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 items by multiple field values
job.json
json
{
"name": "data-item-find",
"taskReferenceName": "find_items",
"description": "Find items matching multiple criteria",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"findMode": "REQUEST",
"request": {
"method": "INLINE",
"contentType": "application/json",
"model": "default",
"json": {
"context": {
"partitionId": "2342"
},
"criteria": {
"type": "and",
"queries": [
{
"type": "eq",
"field": {
"target": "item.fields",
"key": "BRAND"
},
"value": "Acme"
},
{
"type": "search",
"caseSensitive": false,
"field": {
"target": "item.fields",
"key": "TITLE"
},
"value": "organic"
}
]
},
"options": {
"sort": "createdAt",
"sortOrder": "DESC",
"limit": 50
}
}
}
}
}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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
Find items returning only a whitelist of field keys
When a job only needs a few fields per item (e.g. EAN_13 and TITLE), set request.json.options.includedFieldKeys to drastically reduce the response payload and speed up downstream transforms. All other fields are stripped from each item's fields[] array; root metadata is preserved.
job.json (INLINE JSON request)
json
{
"name": "data-item-find",
"taskReferenceName": "find_items",
"description": "Find items, returning only EAN_13 and TITLE in each item's fields",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"findMode": "ALL",
"request": {
"method": "INLINE",
"contentType": "application/json",
"model": "default",
"json": {
"context": {
"partitionId": "2342"
},
"options": {
"includedFieldKeys": ["EAN_13", "TITLE"]
}
}
}
}
}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
request.xml (FILE XML request)
The same option can be supplied through an XML request body. The XML is parsed into the equivalent JSON structure before being processed.
xml
<?xml version="1.0" encoding="UTF-8"?>
<map xmlns="http://www.w3.org/2005/xpath-functions">
<map key="context">
<string key="partitionId">2342</string>
</map>
<map key="options">
<array key="includedFieldKeys">
<string>EAN_13</string>
<string>TITLE</string>
</array>
</map>
</map>1
2
3
4
5
6
7
8
9
10
11
12
2
3
4
5
6
7
8
9
10
11
12
TIP
includedFieldKeysis forwarded to the underlying items API as repeated query parameters (?includedFieldKeys=EAN_13&includedFieldKeys=TITLE).- Unknown keys are silently ignored - they do not raise an error, they just don't appear in the response.
- An empty array (
"includedFieldKeys": []) is dropped from the request, so items are returned with all their fields. When the list comes from an expression (for example the keys found by an earlier task), stop the job before this task when that list is empty. - Composite fields are returned as a whole when their root key is listed. Inner field keys (dot-notation) are not supported.
- This parameter is not a security mechanism. It only shapes the response; access control is unchanged.
Read only some fields of the grid selection
findMode: "USER_SELECTION" ignores request.json.options. To read the items selected in the grid with only some of their fields, or at most a number of them, use REQUEST and pass the launch context yourself: the partition of the launch view, the level of the launch screen (read with Find screens, here in a task named find_screen), and the selection, which the launch context holds in query. This is how the typo detection job reads the text fields it found with Find fields (task find_fields), up to maxItems items.
job.json
json
{
"name": "data-item-find",
"taskReferenceName": "find_items",
"description": "Read the selected items, with the flagged fields only",
"type": "SUB_WORKFLOW",
"optional": false,
"inputParameters": {
"findMode": "REQUEST",
"request": {
"method": "INLINE",
"contentType": "application/json",
"model": "default",
"json": {
"context": {
"partitionId": "${workflow.input.context.view.partition.id}",
"levelId": "${find_screen.output.result.json[0].levelId}"
},
"criteria": "${workflow.input.context.query}",
"options": {
"includedFieldKeys": "${find_fields.output.result.json[*].key}",
"limit": "${workflow.variables.maxItems}"
}
}
},
"outputs": [
{
"outputKey": "json",
"outputMode": "ATTACHMENT",
"mediaType": "application/json"
}
]
}
}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
31
32
33
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
31
32
33
WARNING
- Check that the selection exists first. When nothing is selected, the launch context holds no
query, and anullcriteria fails the task. Stop the job before this task with a Switch on${workflow.input.context.query}(for example the expression$.query != null ? 'OK' : 'NO_SELECTION') and a Terminate task. - Check that the key list is not empty.
"includedFieldKeys": []returns every field. The typo detection job stops before this task whenfind_fieldsfinds no field (${find_fields.output.totalElements}is 0). - Read the key list from an
INLINEoutput. A path such as${find_fields.output.result.json[*].key}resolves only whenfind_fieldsreturns its resultINLINE: on anATTACHMENToutput it resolves to an empty list, and every field is returned. limitcaps the items read. With a select all, the selection is the whole filtered partition: the task reads at mostlimititems, andtotalElementsis the number of items read, not the size of the selection.