Can eSearch be configured to search on multiple fields from the same layer? For example, in the configuration, can it search on both parcel number (PIN) and school? I tried this but eSearch just hangs when I add the School Expression.
"expressions": {
"expression": [
{
"alias": "PIN",
"textsearchlabel": "Search by PIN",
"values": {
"value": [
{
"fieldObj": {
"name": "PIN",
"label": "PIN",
"shortType": "string",
"type": "esriFieldTypeString"
},
"valueObj": {
"value": ""
},
"prompt": "PIN is",
"textsearchhint": "enter PIN number here.",
"sqltext": "Upper(PIN) = Upper('[value]') OR Upper(KEYPIN) = Upper('[value]')",
"operation": "stringOperatorIs"
}
]
}
},
"alias": "SCHOOLDESCRIPTION",
"textsearchlabel": "Search by CVT",
"values": {
"value": [
{
"fieldObj": {
"name": "SCHOOLDESCRIPTION",
"label": "SCHOOLDESCRIPTION",
"shortType": "string",
"type": "esriFieldTypeString"
},
"valueObj": {
"value": ""
},
"prompt": "SCHOOLDESCRIPTION is",
"textsearchhint": "enter SCHOOLDESCRIPTION number here.",
"sqltext": "Upper(SCHOOLDESCRIPTION) like Upper('[value]')",
"operation": "stringOperatorIs"
}
]
}
}
]
},
Solved! Go to Solution.
Tom,
Are you manually editing this json? It appears so because if you use the widget setting UI it would have added an "operator": "AND" property to the SCHOOLDESCRIPTION expression value.
Yes, the widget can definitely handle multiple fields in a query.
Tom,
Are you manually editing this json? It appears so because if you use the widget setting UI it would have added an "operator": "AND" property to the SCHOOLDESCRIPTION expression value.
Yes, the widget can definitely handle multiple fields in a query.
Robert,
Yes I was configuring it manually. I put it back into the configurator which added the "operator" property.
It all works well now! Thanks!!
tom
Nevermind!! I just didn't configure it correctly.