AnsweredAssumed Answered

How do you query a text string that contains an apostrophe?

Question asked by monzay on Jan 27, 2012
Latest reply on Mar 26, 2014 by lgxdw
I have a featureclass with a value (type: text) that contains an apostrophe (ex: Red's Reef). The value is being passed into the query function. When I query for that string nothing happens and I get no error in firebug. Using console log I can see that the value is being passed in properly and I can see that the query.where value is correct too.

I can see in ArcMap and the Services directory that including a second apostrophe results in a successful search.

I have tried to add a second apostrophe or using escape characters in the original value (it starts out in json text, gets pulled into a drop down menu, and then gets passed on to the query function) but nothing seems to work.

The easiest thing for me to do is remove the apostrophe for the field value itself but I'm changing the official spelling of this place and I would rather not do that. I'm curious to know if there is a workaround.