Answered
Hi Thomp,
I have a set of textfields with a button next to it, when i click on the button values will be shifted from one text field to other. Something like this:
myField__5.rawValue = myField__4.rawValue;
myField__4.rawValue = myField__3.rawValue;
myField__3.rawValue = myField__2.rawValue;
.
.
instead of doing like this i want to make it in a generic way by using a for loop, can you tell me how can i do that?
I tried like this:
for(var i =5 ; i>0 ; i--)
{
this.getField("myField__"+i).value = this.getField("myField__"+i-1).value;
}
but, its not working, is it the right way to do?
Thanks in Advance,
Pavan
What is the text of the error?
What script language are you using for this script in LiveCycle Designer?
Have you verified that the value of the field name you are trying to generate is being computed properly?
Have you tried to walk through the loop and see what is happening with each value of 'i'?
George Kaiser