<?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: Having Trouble with Query outFields in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/having-trouble-with-query-outfields/m-p/648360#M60440</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Chris,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Take a look at the Formatting InfoWindows help file at &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/intro_formatinfowindow.htm"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/intro_formatinfowindow.htm&lt;/A&gt;&lt;SPAN&gt; and the sample at &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/widget_infowindow.html"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/widget_infowindow.html&lt;/A&gt;&lt;SPAN&gt; to see how to handle this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 06 Jun 2011 03:55:36 GMT</pubDate>
    <dc:creator>StephenLead</dc:creator>
    <dc:date>2011-06-06T03:55:36Z</dc:date>
    <item>
      <title>Having Trouble with Query outFields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/having-trouble-with-query-outfields/m-p/648359#M60439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm having a bit of trouble with query outfields. Specifically, I have been trying to save the value of a certain outField in a string var, and then do some action depending on what that value is.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm able to have the value print out in my map by using this code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var cableTxt = "";
cable = "${cable}";
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
infoTemplate= new esri.InfoTemplate("${blah}", "Cable : " + cable " &amp;lt;br/&amp;gt;&amp;nbsp; ...");&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Which currently is either a 1 or a 0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I want to do, is when I save the value of ${cable} into cableTxt, is call an if statement, changing cableText to be the corresponding english counterpart of 1 or 0.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So instead of having the infoTemplate print out..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cable: 1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to see..&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Cable: Yes&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm imagining something along the lines of&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;var cable = "";
cable = "${cable}";

if(cable == 1){
&amp;nbsp;&amp;nbsp; cable = "Yes";
}

infoTemplate= new esri.InfoTemplate("${blah}", "Cable : " + cable + " &amp;lt;br/&amp;gt;&amp;nbsp; ...");&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there a way to do this? Right now it recognizes ${cable} literally, but doesn't in the infotemplate which is confusing to me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 04 Jun 2011 17:40:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/having-trouble-with-query-outfields/m-p/648359#M60439</guid>
      <dc:creator>ChrisFarver</dc:creator>
      <dc:date>2011-06-04T17:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: Having Trouble with Query outFields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/having-trouble-with-query-outfields/m-p/648360#M60440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Chris,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Take a look at the Formatting InfoWindows help file at &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/intro_formatinfowindow.htm"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm#jshelp/intro_formatinfowindow.htm&lt;/A&gt;&lt;SPAN&gt; and the sample at &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/widget_infowindow.html"&gt;http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/widget_infowindow.html&lt;/A&gt;&lt;SPAN&gt; to see how to handle this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Steve&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 03:55:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/having-trouble-with-query-outfields/m-p/648360#M60440</guid>
      <dc:creator>StephenLead</dc:creator>
      <dc:date>2011-06-06T03:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Having Trouble with Query outFields</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/having-trouble-with-query-outfields/m-p/648361#M60441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the reply. I'll take a look&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 05:29:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/having-trouble-with-query-outfields/m-p/648361#M60441</guid>
      <dc:creator>ChrisFarver</dc:creator>
      <dc:date>2011-06-06T05:29:03Z</dc:date>
    </item>
  </channel>
</rss>

