Script to see if object border fill color is green

DKinsley

01-09-2016

When a user selects an answer from a drop down object a text box turns green (if the correct answer).

I want to write a script to check to see if the object is green and loop thru all the table rows.

This is what I have but it will not detect the green color.

var nCount = 0;

var vRows = 47;

for(i=vRows;i>=0;i--){

if(Table1.resolveNode("Row[" + i + "]").Signal.border.fill.color.value == "204,255,204" ){

  nCount = nCount +1;

  this.rawValue = nCount;

  }

}

if(nCount ==0){

  this.rawValue = nCount;

}

Accepted Solutions (0)

Answers (1)

Answers (1)

DKinsley

01-09-2016

The script above will work if in the layout ready event but not the calculate event.

Why does it not work in the calculate event?

If my if statement involves a rawValue - it works in the calculate event - why doesn't this work when the if statement is checking the color of the object?