You're pretty close, but probably need a transformation to return the results correctly from the virtual export and to the form.
{
"fieldMap": {
"company": {
"type": "exportSelect",
"id": "company",
"name": "company",
"label": "company",
"resource": {
"virtual": {
"name": "Get companies",
"_connectionId": "6525a3099085040ecbf55b4d",
"http": {
"relativeURI": "/v2.0/companies",
"method": "GET",
"paging": {
"method": "url",
"path": "[@odata.nextLink]",
"lastPageStatusCode": 404
},
"response": {
"resourcePath": "value"
}
},
"transform": {
"type": "expression",
"expression": {
"rules": [
[]
],
"rulesTwoDotZero": {
"mappings": [
{
"generate": "value",
"dataType": "string",
"extract": "$.id",
"status": "Active",
"sourceDataType": "string"
},
{
"generate": "label",
"dataType": "string",
"extract": "$.name",
"status": "Active",
"sourceDataType": "string"
}
],
"mode": "create"
},
"version": "2"
},
"rules": [
[]
],
"version": "2"
},
"adaptorType": "HTTPExport"
}
}
},
"customer": {
"id": "customer",
"name": "customer",
"type": "exportSelect",
"label": "customer list based on company",
"supportHandlebars": true,
"refreshOptionsOnChangesTo": [
"company"
],
"visibleWhen": [
{
"field": "company",
"isNot": [
null,
""
]
}
],
"resource": {
"virtual": {
"name": "Get customers",
"_connectionId": "6525a3099085040ecbf55b4d",
"http": {
"relativeURI": "/v2.0/companies({{export.company}})/customers",
"method": "GET",
"paging": {
"method": "url",
"path": "[@odata.nextLink]",
"lastPageStatusCode": 404
},
"response": {
"resourcePath": "value"
}
},
"transform": {
"type": "expression",
"expression": {
"rules": [
[]
],
"rulesTwoDotZero": {
"mappings": [
{
"generate": "value",
"dataType": "string",
"extract": "$.id",
"status": "Active",
"sourceDataType": "string"
},
{
"generate": "label",
"dataType": "string",
"extract": "$.displayName",
"status": "Active",
"sourceDataType": "string"
}
],
"mode": "create"
},
"version": "2"
},
"rules": [
[]
],
"version": "2"
},
"adaptorType": "HTTPExport"
}
}
}
}
}
All list options require some standard format which is why a transformation is needed to return a response such as:
"options": [
{
"items": [
"Create",
"Update",
"Delete"
]
}
]
or
{
"options": [
{
"items": [
{
"label": "Delhi",
"value": "Delhi"
},
{
"label": "Hyderabad",
"value": "Hyderabad"
},
{
"label": "Chennai",
"value": "Chennai"
}
]
}
]
}