Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only

Do While Loop 

03/26/20 04:10 PM

Forum question posted - 

We are attempting to add in code for a Do While Loop and running into problems

 

This is what I have tried in addition to changing many things like removing the Index, putting the whole while commands in [], commas, no commas.  Nothing seems to work.  It seems to me that the Do While needs to be encased in something so that it runs those lines as one command maybe?

 

 

{"index":94,"event":"makeVariable","id":"m6dfccb0d_tdrow_[C:5]_txt-tb[R:0]","params":["ASTAT"]},

                                                               

                                                               

                                                                {"index":95,"event":"while", "condition":["{$ASTAT}==NEW"]},

       

                                                                {"index":96,"event":"click","id":"m6dfccb0d_ttrow_[C:5]_ttitle-lb","comment":"Click the  image","eventType":"click"},

       

                                                                {"index":97,"event":"endwhile"},

 

 

I do not get an error, it just skips over like it's not even there.



Response -

 

I see two problems with this while loop.

 

1. There should not be any brackets around the condition - it should just be "condition":"{$ASTAT} == NEW"},

2. The value is never checked again inside the while loop, so if the value is NEW initially, you will be stuck in an endless loop.

 

Thanks, 

Kristin




#Maximo
#AssetandFacilitiesManagement
#MaximoEAM

Statistics
0 Favorited
2 Views
0 Files
0 Shares
0 Downloads