Hi,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.I'm able to have the value print out in my map by using this code:var cableTxt = "";
cable = "${cable}";
infoTemplate= new esri.InfoTemplate("${blah}", "Cable : " + cable " <br/> ...");
Which currently is either a 1 or a 0.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.So instead of having the infoTemplate print out..Cable: 1I would like to see..Cable: YesI'm imagining something along the lines ofvar cable = "";
cable = "${cable}";
if(cable == 1){
cable = "Yes";
}
infoTemplate= new esri.InfoTemplate("${blah}", "Cable : " + cable + " <br/> ...");
Is there a way to do this? Right now it recognizes ${cable} literally, but doesn't in the infotemplate which is confusing to me.Thanks