<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Help with SQL query in Enhanced Search Widget in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/help-with-sql-query-in-enhanced-search-widget/m-p/733602#M22077</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Juan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; So the issue is ArcGIS Server does not support the SQL syntax. You can test this by attempting the query that you have working in ArcMap and trying to use that in your Map Service REST endpoint form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;A href="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/MapServer/2/query?text=&amp;amp;geometry=&amp;amp;geometryType=esriGeometryPoint&amp;amp;inSR=&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;relationParam=&amp;amp;objectIds=&amp;amp;where=ZONING_CODE+LIKE+REPLACE%28%27%25O+R+1%25%27%2C%22+%22%2C+%22%22%29&amp;amp;time=&amp;amp;returnCountOnly=false&amp;amp;returnIdsOnly=false&amp;amp;returnGeometry=false&amp;amp;maxAllowableOffset=&amp;amp;outSR=&amp;amp;outFields=*&amp;amp;f=html" title="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/MapServer/2/query?text=&amp;amp;geometry=&amp;amp;geometryType=esriGeometryPoint&amp;amp;inSR=&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;relationParam=&amp;amp;objectIds=&amp;amp;where=ZONING_CODE+LIKE+REPLACE%28%27%25O+R+1%25%27%2C%22+%22%2C+%22%22%29&amp;amp;time=&amp;amp;returnCountOnly=false&amp;amp;returnIdsOnly=false&amp;amp;returnGeometry=false&amp;amp;maxAllowableOffset=&amp;amp;outSR=&amp;amp;outFields=*&amp;amp;f=html"&gt;http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/MapServer/2/query?text=&amp;amp;geometry=&amp;amp;geometryType=esriGeometryPoint&amp;amp;inSR=&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;relationParam=&amp;amp;objectIds=&amp;amp;where=ZONING_CODE+LIKE+REPLACE%28%27%25O+R+1%25%27%2C%22+%22%2C+%22%22%29&amp;amp;time=&amp;amp;returnCountOnly=false&amp;amp;returnIdsOnly=false&amp;amp;returnGeometry=false&amp;amp;maxAllowableOffset=&amp;amp;outSR=&amp;amp;outFields=*&amp;amp;f=html&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Sep 2014 20:26:20 GMT</pubDate>
    <dc:creator>RobertScheitlin__GISP</dc:creator>
    <dc:date>2014-09-09T20:26:20Z</dc:date>
    <item>
      <title>Help with SQL query in Enhanced Search Widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/help-with-sql-query-in-enhanced-search-widget/m-p/733597#M22072</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #444444; font-family: Verdana, Helvetica, sans-serif; font-size: 12px;"&gt;I am trying to modify the input value in the Enhanced Search Widget using SQL. I have tested the SQL expression in the ArcMap field calculator and it works but it fails inside the Enhanced Search Widget.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #444444; font-family: Verdana, Helvetica, sans-serif; font-size: 12px;"&gt; I have a field called MapTaxlot where the values have random spaces. Some of the values have 1, 2, o 3 spaces. &lt;BR /&gt;I want the users to be able to type the field value with spaces and modify the input value to eliminate the spaces and query a field where the values have no spaces.&lt;BR /&gt;The reason for this is because when we try to use field values with spaces the query fails. &lt;BR /&gt;&lt;BR /&gt;The SQL query to eliminate the spaces is: replace([MapTaxlot]," ", "") &lt;BR /&gt;When I combine the above SQL query with the value input in the Enhanced Search Widget it doesn't return a result. &lt;BR /&gt;Here is my combined query: &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #444444; font-family: Verdana, Helvetica, sans-serif; font-size: 12px;"&gt;&amp;lt;expression alias="Taxlot" textsearchlabel="Enter the taxlot number below"&amp;gt; &amp;lt;values&amp;gt; &amp;lt;value&amp;gt;Taxlot_Num like ('%replace([value," ", "")%')&amp;lt;/value&amp;gt; &amp;lt;/values&amp;gt; &amp;lt;/expression&amp;gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #444444; font-family: Verdana, Helvetica, sans-serif; font-size: 12px;"&gt;I hope Robert or somebody else could give a clue about what is happening. Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 18:26:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/help-with-sql-query-in-enhanced-search-widget/m-p/733597#M22072</guid>
      <dc:creator>Juan-CarlosTorres</dc:creator>
      <dc:date>2014-09-09T18:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SQL query in Enhanced Search Widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/help-with-sql-query-in-enhanced-search-widget/m-p/733598#M22073</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need a closing bracket on [value &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #444444; font-family: Verdana, Helvetica, sans-serif; font-size: 12px;"&gt;Taxlot_Num like ('%replace([value]," ", "")%')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 18:50:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/help-with-sql-query-in-enhanced-search-widget/m-p/733598#M22073</guid>
      <dc:creator>JeffWard</dc:creator>
      <dc:date>2014-09-09T18:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SQL query in Enhanced Search Widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/help-with-sql-query-in-enhanced-search-widget/m-p/733599#M22074</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On second thought, this is probably better:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #444444; font-family: Verdana, Helvetica, sans-serif; font-size: 12px;"&gt;Taxlot_Num like replace('%[value]%',' ', '')&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 19:38:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/help-with-sql-query-in-enhanced-search-widget/m-p/733599#M22074</guid>
      <dc:creator>JeffWard</dc:creator>
      <dc:date>2014-09-09T19:38:51Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SQL query in Enhanced Search Widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/help-with-sql-query-in-enhanced-search-widget/m-p/733600#M22075</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Jeff.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first one executes but it doesn't return anything. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second one gives an error message.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am pretty sure is the syntax because I am able to eliminate the empty spaces using the query in the field calculator.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 20:05:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/help-with-sql-query-in-enhanced-search-widget/m-p/733600#M22075</guid>
      <dc:creator>Juan-CarlosTorres</dc:creator>
      <dc:date>2014-09-09T20:05:57Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SQL query in Enhanced Search Widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/help-with-sql-query-in-enhanced-search-widget/m-p/733601#M22076</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Juan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I believe the issue you are running into is because Flex uses Replace as a keyword Just like SQL does and that is a conflict. I will have to do some verifying but I think I have looked at this exact situation before for another forum question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Robert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 20:17:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/help-with-sql-query-in-enhanced-search-widget/m-p/733601#M22076</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2014-09-09T20:17:42Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SQL query in Enhanced Search Widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/help-with-sql-query-in-enhanced-search-widget/m-p/733602#M22077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Juan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; So the issue is ArcGIS Server does not support the SQL syntax. You can test this by attempting the query that you have working in ArcMap and trying to use that in your Map Service REST endpoint form.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;A href="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/MapServer/2/query?text=&amp;amp;geometry=&amp;amp;geometryType=esriGeometryPoint&amp;amp;inSR=&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;relationParam=&amp;amp;objectIds=&amp;amp;where=ZONING_CODE+LIKE+REPLACE%28%27%25O+R+1%25%27%2C%22+%22%2C+%22%22%29&amp;amp;time=&amp;amp;returnCountOnly=false&amp;amp;returnIdsOnly=false&amp;amp;returnGeometry=false&amp;amp;maxAllowableOffset=&amp;amp;outSR=&amp;amp;outFields=*&amp;amp;f=html" title="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/MapServer/2/query?text=&amp;amp;geometry=&amp;amp;geometryType=esriGeometryPoint&amp;amp;inSR=&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;relationParam=&amp;amp;objectIds=&amp;amp;where=ZONING_CODE+LIKE+REPLACE%28%27%25O+R+1%25%27%2C%22+%22%2C+%22%22%29&amp;amp;time=&amp;amp;returnCountOnly=false&amp;amp;returnIdsOnly=false&amp;amp;returnGeometry=false&amp;amp;maxAllowableOffset=&amp;amp;outSR=&amp;amp;outFields=*&amp;amp;f=html"&gt;http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_LandRecords_Louisville/MapServer/2/query?text=&amp;amp;geometry=&amp;amp;geometryType=esriGeometryPoint&amp;amp;inSR=&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;relationParam=&amp;amp;objectIds=&amp;amp;where=ZONING_CODE+LIKE+REPLACE%28%27%25O+R+1%25%27%2C%22+%22%2C+%22%22%29&amp;amp;time=&amp;amp;returnCountOnly=false&amp;amp;returnIdsOnly=false&amp;amp;returnGeometry=false&amp;amp;maxAllowableOffset=&amp;amp;outSR=&amp;amp;outFields=*&amp;amp;f=html&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 20:26:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/help-with-sql-query-in-enhanced-search-widget/m-p/733602#M22077</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2014-09-09T20:26:20Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SQL query in Enhanced Search Widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/help-with-sql-query-in-enhanced-search-widget/m-p/733603#M22078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Juan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; The only way I know to get around this is to change the source code to doe the REPLACE in Flex instead of trying to pass it to the server to do. Let me know if you have the ability to recompile the source and I will point you in the right direction.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 20:28:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/help-with-sql-query-in-enhanced-search-widget/m-p/733603#M22078</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2014-09-09T20:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Help with SQL query in Enhanced Search Widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/help-with-sql-query-in-enhanced-search-widget/m-p/733604#M22079</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Robert,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently using the compiled version of your widget and the ArcGIS Viewer for Flex.&lt;/P&gt;&lt;P&gt;I have no flex compiler available &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Sep 2014 20:33:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/help-with-sql-query-in-enhanced-search-widget/m-p/733604#M22079</guid>
      <dc:creator>Juan-CarlosTorres</dc:creator>
      <dc:date>2014-09-09T20:33:31Z</dc:date>
    </item>
  </channel>
</rss>

