If the ‘Field Data type’ is set to lookup and the 'Server Lookup Key' is specified In the configuration of a Field Definition (either in the Admin Panel or in the definition provided by FieldDefinitionsForDocument), the lookup values will be retrieved from the iConnector Server.
For this, the Web Service Method LookupValuesForKey should be provided.
In a scenario where FieldDefinitionsForInput is used, LookupValuesForKey should not be used.
An example of the HTTP headers:
POST https://Server/ConnectorService.svc/json/LookupValuesForKey HTTP/1.1
Content-Type: application/json; encoding=utf-8
Accept: application/json
Accept-Charset: utf-8
An example of the JSON body:
{
"Configuration": {
"ConfigurationUniqueId": "e7d45bd6-1c1c-4af7-b389-121e18a2e4b8",
"Name": "JSON Test",
"CustomConfiguration": null,
"CustomData": null
},
"DocumentType": {
"DocumentTypeUniqueId": "6794225c-97ce-48ea-b135-9150741a9a02",
"Name": "DynamicFieldTest",
"SaveNameTemplate": null,
"DocumentFormat": "PDF",
"CustomConfiguration": null
},
"Fields": [
{
"Name": "CustomerID",
"Value": ""
},
{
"Name": "Department",
"Value": "DepartmentA"
},
{
"Name": "Employee",
"Value": null
}],
"Key": "Employee"
}
The values of all fields as currently specified by the user are available. This makes it possible to return a list of lookup values that is dependent on any of the other fields. In the example, the Employee list is dependent on the Department.
An example of the JSON response:
[
{
"DisplayValue": "A. First",
"Value": "101"
},
{
"DisplayValue": "A. Second",
"Value": "102"
},
{
"DisplayValue": "A. Third",
"Value": "103"
}
]