Wednesday, 24 April 2019

Loops in Automation Script | Maximo

#looping
--for loop
LineSet = mbo.getMboSet("INVUSELINE")
for i in range ( 0, LineSet.count() ):
line = LineSet.getMbo(i)
.... code here

--while loop-------------
LineSet = mbo.getMboSet("INVUSELINE")
line = LineSet.moveFirst()
while (line):
...code here
line = LineSet.moveNext()

----
assetSet = mbo.getMboSet("Asset")
asset = assetSet.moveFirst()
while(asset):
....code here
asset = assetSet.moveNext()

No comments:

Post a Comment