WAB eSearch "parcel between x and y"

371
4
Jump to solution
09-22-2016 08:11 AM
WilliamBailey
New Contributor II

Rich,

I see Flexviewer eSearch posts mentioning "between" queries.

I have need in WAB for sql like this:    " Parcel between 'x' and 'y' "

Will result in collection of parcels based on a range where x and y are typed in by user.

Please point me in the right direction.

p.s. Keep up the good work on your widgets, love em.

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Esteemed Contributor

William,

   Yes you can. What does the SQL look like?

View solution in original post

0 Kudos
4 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

William,

   If you are searching by a numeric parcel number the you can easily do a greater than x AND less than Y query in the WAB eSearch widget. just add two expression values when using the settings dialog for the query expression.

0 Kudos
WilliamBailey
New Contributor II

Parcel is a string, query works in TSQL.

Can I edit config_Enhanced Search.json in configs\eSearch ?

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

William,

   Yes you can. What does the SQL look like?

0 Kudos
WilliamBailey
New Contributor II

All is working as expected, thanks again

TSQL:

where parcel_key >= '1720305TH00000000' and parcel_key <= '18203030099999999'

Config:

{

"fieldObj": {

"name": "PARCEL_KEY",

"label": "PARCEL_KEY",

"shortType": "string",

"type": "esriFieldTypeString"

},

"valueObj": {

"value": "Low Parcel Number"

},

"prompt": "PARCEL_KEY is >=",

"textsearchhint": "Low Parcel Number",

"sqltext": "Upper(PARCEL_KEY) >= Upper('[value]')",

"operation": "stringOperatorIs",

"required": true

},

{

"fieldObj": {

"name": "PARCEL_KEY",

"label": "PARCEL_KEY",

"shortType": "string",

"type": "esriFieldTypeString"

},

"valueObj": {

"value": "High Parcel Number"

},

"prompt": "PARCEL_KEY is <=",

"textsearchhint": "High Parcel Number",

"sqltext": "Upper(PARCEL_KEY) <= Upper('[value]')",

"operation": "stringOperatorIs",

"operator": "AND",

"required": true

}

0 Kudos