try the following....if (this.resolveNode("caption.value.#text").value != "Available") { this.resolveNode("caption.value.#text").value= "Available"; this.fillColor= "55,55,55";}else { this.resolveNode("caption.value.#text").value= "NotAvailable"; this.fillColor= "255,255,255";}