Thursday, 2 November 2017

Looping Over an array in Automation Script

To loop over an array you can use while loop

Example :

from psdi.mbo import GLFormat
print "****************************testing*****************************"
locSet=mbo.getMboSet("LOCATION")
glvalue=locSet.getMbo(0).getMboValue("GLACCOUNT").toString()
fmt =GLFormat(glvalue,mbo.getString("ORGID"))
print fmt.getSegmentCount()
glarray=fmt.getSegments()
i=0
while(i<len(glarray)) :
   print "******************"
   print glarray[i]
   i=i+1

No comments:

Post a Comment