1 Reply Latest reply on Jan 9, 2014 11:26 AM by philmodjunk

    Loop Structure



      Loop Structure


           So I have a line of 63 portals that I need to calculate the field contents together, you may be asking why i have so many portals but its a job cost database from time sheets that i have to filter down each time entered by work type (install, programming, ect....) and the job number because people work on different job numbers a day. So i need to run this report to see how many hours were actually spent installing and programming ect... by job number. Ive got all the portals to reflect the right information so right now i'm trying to create a script that will go into each portal field and copy the data. Rather than doing the script step go to object name 63 times, is there a way to loop it and end the loop when it reaches the last number.


           I've got the object named Install 1 through install 63, how do i make a loop that will add a 1 at the field name and exit when it reaches 63?

        • 1. Re: Loop Structure

               A loop is possible, but I don't see a need for such a looping script in the first place. With the right data model, Summary fields and a find performed on the portals' data source table could produce what you need with no loop used at all.

               But if you set a variable up as a loop counter with Set Variable [$K ; value: $K + 1 ]

               You could use Go to Object ["Install : & $K ]

               to put the focus in a different portal with each iteration of your loop.