Script to see if object border fill color is green

Avatar

Avatar
Validate 100
Level 3
DKinsley
Level 3

Likes

9 likes

Total Posts

545 posts

Correct reply

5 solutions
Top badges earned
Validate 100
Validate 50
Validate 25
Validate 10
Validate 1
View profile

Avatar
Validate 100
Level 3
DKinsley
Level 3

Likes

9 likes

Total Posts

545 posts

Correct reply

5 solutions
Top badges earned
Validate 100
Validate 50
Validate 25
Validate 10
Validate 1
View profile
DKinsley
Level 3

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)

Avatar

Avatar
Validate 100
Level 3
DKinsley
Level 3

Likes

9 likes

Total Posts

545 posts

Correct reply

5 solutions
Top badges earned
Validate 100
Validate 50
Validate 25
Validate 10
Validate 1
View profile

Avatar
Validate 100
Level 3
DKinsley
Level 3

Likes

9 likes

Total Posts

545 posts

Correct reply

5 solutions
Top badges earned
Validate 100
Validate 50
Validate 25
Validate 10
Validate 1
View profile
DKinsley
Level 3

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?