Search Widget generates error when user types an apostrophe.
My search widget reads the names of terrestrial species of concern from a web service attribute table and displays the names of the species by their scientific and common name. It works well listing all the different species names, both scientific and common.
Within the widget, the option “select by attribute” allows the user to select a single species and display its location. However, an error occurs when the user inputs (types) a species common name that contains an apostrophe.
The error generated is [RPC Fault faultString=”Unable to complete operation.” faultCode=”400” faultDetail=””].
How can I get the widget to accept a user’s input of a common name containing an apostrophe without generating an error?
Gina Ross
Jorgina,
It sounds like the Search widget is not properly escaping the apostrophe.
May be Matt can offer some advice.
I believe this was fixed in 3.16. What JSAPI version are you using Jorgina Ross?
Matt,
I am using agslib-3.6-2013-12-13 swc.
Gina
Jorgina A. Ross
Kansas Applied Remote Sensing Program
Kansas Biological Survey
University of Kansas
785-864-1524
ginaross@ku.edu<mailto:ginaross@ku.edu>
Jorgina,
Flex is now an unsupported esri technology so there is no hope for getting this fixed if it was not fixed in 3.7.
Robert,
Thank you for your prompt response. My way around it is to ask users to type double apostrophes[‘’] and it works, not very elegant though.
Gina
Jorgina A. Ross
Kansas Applied Remote Sensing Program
Kansas Biological Survey
University of Kansas
785-864-1524
ginaross@ku.edu<mailto:ginaross@ku.edu>
Matt,
I'm sorry I did not notice this was a Flex Question.