DC5.0.0 1 ID
- Mathias Mattson (MHM)
Every ID in a search MUST be unique.
The ID has two different uses depending on whether the ID belongs to a Filter or Value Field.
1.1 ID of a Filter
A parameter for a filter is given as either a query string or form-data. In either case, the parameter MUST be given as a key-value pair, in which the "key" is the Filter's ID and the "value" is the parameter value(s). This is almost always true, but the Free Text filter is a special case.
Example:
A query string for a search with a Filter:
is
?searchName=<search name>&accessKey=<access key>&page=<page number>&limit=<limit>&sItemId=5
This request will filter out any results, which does NOT have the item ID of "5", i.e. the response will only contain data concerning an item with item ID "5".
1.2 ID of a Value Field
The ID of a Value Field maps to the property name in the search response.
Example:
There are many other Value Fields in this search, but let's focus on the "total" Value Field, which can be seen at line number 42.
The response JSON:
{ "error": "", "items": [ { "isCaseSensitive": "0", "is_html": "0", "itemId": "2380", "item_datatypeid": "169", "iterated": "0", "metaFieldGroup": { "metafieldGroupId": "10025", "metafieldGroupIsSubGroup": "0", "metafieldGroupName": "All asset types" }, "metafieldAutoTranslate": "0", "metafieldComboViewType": "", "metafieldCulture": "", "metafieldFormfieldsize": "0", "metafieldId": "10192", "metafieldIsRequired": "0", "metafieldIsRequiredUpload": "0", "metafieldMaxlength": "0", "metafieldName": "Keywords", "metafieldReadonly": "0", "metafieldRecurisveToRoot": "0", "metafieldSecWriteaccess": "1", "metafieldSortindex": "10192", "metafieldSubGroup": "", "metafieldSubGroupIteration": "0", "metafieldSubgroupname": "", "metafieldValidationId": "", "metafieldValidationName": "", "metafieldVisibilityMetafieldId": "", "metafieldVisibilityRegex": "", "name": "Keywords", "plugin": "", "restrictToAssetType": "0", "restrictToAssetTypeName": "", "showInList": "1", "show_extra_field": "0", "system": "0", "total": "1", //The "total" Value Field "treeviewHeight": "0", "treeviewLoadDynamic": "0", "treeview_format": "0", "treeview_is_expanded": "0" } ], "success": true, "total": "1" }
1.3 Labels
Another important thing to keep in mind, is that any Value Field used to output data, which is used in the Media Manager is usually (almost always) associated with a label. A good example of this is the Media Manager's Asset Info:
The Asset Preview
In the window pane to the right (the one with the "Asset Info" title), there are several pieces of data: Title with value "Beloved cat", Upload Date with value "02/12/2016", etc. Each of these data directly maps to a Value Field and a label.
Let's look at the Value Field title:
The labels for the Media Manager can be found by going to
- DAM Center.
- System Tools.
- ConfigManager.
- DigiZuite™ Media Manager.
- Click the version number.
- Choose the Labels tab.
In this case, the labels for the Asset Info are found in the folder DigiZuite™ Media Manager/AssetInfo.
In this folder, there is a label with Constant "title" and label "Title". The Constant maps directly to the value field's ID.
In the "Asset Preview" image above, the last data has no label and a value of "no". This is the result of a search modification, where a Value Field has been added, but the user did not create a new label with a Constant matching the new Value Field's ID. This results in a bad user experience and SHOULD be avoided.
Table of contents: