Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

While loop: counter in the field name

$
0
0

Here is the code I have. I have tested it and it works on the one number field. (in Formcalc)

 

if ((FS270Pt1 >= 28.5) and (FS270Pt1 <= 38))

then FS270Pt1.font.fill.color.value = "0,0,0"

else FS270Pt1.font.fill.color.value = "255,0,0"

endif

 

I have 15 number fields that I need to apply this color font to should the criteria be met.  I am trying to use a While statement to achieve this.  From what I know I have deduced that it would look something like this:

 

var i = 1

 

while (i <= 15)

do

     if ((FS270Pt(i) >= 28.5) and (FS270Pt(i) <= 38))

          then FS270Pt(i).font.color.value = "0,0,0"

          else FS270Pt(i).font.color.value = "255,0,0"

     endif

     i = i + 1

endwhile

 

When I run the 'Check Script Syntax' I do not get any errors.  However, at runtime it states that FS270Pt is unknown.  How can I perform a loop on the binding names of the fields?


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>