Select to view content in your preferred language

Search First and Last name, in Owner1 and Owner2 Fields

355
0
06-10-2023 10:08 AM
NormB
by
New Contributor III

Hello all,

I have two fields  Owner1 and Owner2  that contain  concatenated First Name, middle initial, Last Name for owners in them. I have started to create a search that first allows the user to enter last name and first name into separate search boxes.  The code that I have created, I thought would narrow down the list by Last name and then reselect from that list where it finds first name to meet the criteria.  This is the code I have developed and I am looking for help that can guide me on how to create a search for a name like John  A Smith, or Mary Q Smith in Owner1 or Owner2 fields when the user enters John Smith or Mary Smith or any part that matches in either search box.

The rest endpoint for this service is also attached.  Thanks in advance for any help! 

Cheers!

-----------

{
"alias": "Owner Name",
"textsearchlabel": "Search by Owner Name",
"values": {
"value": [
{
"fieldObj": {
"name": "LandRecTable_2023.OWNERNME1",
"label": "OwnerName",
"shortType": "string",
"type": "esriFieldTypeString"
},
"valueObj": {
"value": ""
},
"prompt": "Enter Last Name",
"textsearchhint": "Smith",
"sqltext": "Upper(LandRecTable_2023.OWNERNME1) LIKE Upper('%[value]%') OR Upper(LandRecTable_2023.OWNERNME2) LIKE Upper('%[value]%')",
"operation": "stringOperatorContains",
"operator": "AND"
},
{
"fieldObj": {
"name": "LandRecTable_2023.OWNERNME1",
"label": "OwnerName1",
"shortType": "string",
"type": "esriFieldTypeString"
},
"valueObj": {
"value": ""
},
"prompt": "Enter First Name",
"textsearchhint": "John",
"sqltext": "Upper(LandRecTable_2023.OWNERNME1) LIKE Upper('%[value]%') OR Upper(LandRecTable_2023.OWNERNME2) LIKE Upper('%[value]%')",
"operation": "stringOperatorContains",
"operator": "AND"
}
]
}
},

------------

https://manitowocmaps.info/arcgis/rest/services/Web_MercParBase_2023/MapServer/86

Tags (2)
0 Kudos
0 Replies