3 Replies Latest reply on Mar 3, 2009 12:15 PM by Thicks

    Script help



      Script help


      I have written the following script but it is not working correctly I need to modify it so that it only grabs my Employee_g repititions 11-15> I think I need to change the set varible. Please help if you can


      Set Error capture [on]

      Allow User Abort [off]

      set variable [$ctr; value:0]

      set variable [$max; value10]




      set variable [$ctr; value$ctr+1]


      Set field [dataentry::employee_g; getrepetition9dataentry::EmployeeS#; $ctr$var70]


      If [dataentry::employee_g]


      go to layout ["BcaseRespondentsLetter"(dataentry)]


      Print setup



      goto layout [original layout]


      end if


      exit loop if [$ctr=$max]


      end loop

        • 1. Re: Script help

          I'm a bit confuse with $ctr$var70 in your setfield statement.

          Set field [dataentry::employee_g; getrepetition9dataentry::EmployeeS#; $ctr$var70] 


          I'll assume it's a typo.


          So it seems like your variables should be set as 


          set variable [$ctr; value:10] -  you want to start with rep 11 

          set variable [$max; value 15] - and exit loop at rep 15 




          • 2. Re: Script help

            Yes it was a typo


            Thank you for teaching me about the set variable


            However, when I run the script it goes to the layout and prints it (several times) but it leaves the Employee_g field blank (or employee name) blank


            Any suggestions

            • 3. Re: Script help
                 nevermind found the mistake thank you for all of your help