Accepted Solution

Row Loop variable



I'm starting with a list of IQNs entered in CSV format from an input variable, iqnList, to create multiple igroups based on the server name


Example is:,,


I created a function, getServerFromIQN that takes the iqn name and just leaves the host name.


I create a row loop for Number of Time with Number of Times equal to getSize($iqnList)


The Variable Index is set to iGroupIdx


Variable Name is iGroupName

Initial Value is getServerFromIQN(getValueAt($iqnList,1))

Expression is getServerFromIQN(getValueAt($iqnList,iGroupIdx+1))


My problem is that if the the Expression is performed after the last item in my list and so there isn't an iGroupIdx+1 to look at and I get an error.


How can I set the Expression to only evaluate if the size of the list is less than the iGroupIdx?  I tried an if/then, but got an error evaluating the expression.


This is WFA 2.2.







Re: Row Loop variable


Can you please try with:






Re: Row Loop variable



When I remove the +1, I don't get an error, but it loops through the first item twice.  I'm doing a NoOp to see if the igroup exists before creating it and end up with incorrect results when I remove the +1.


I think I need the expression, to not calculate on the last iteration.


I've attached the dar file to help out.






Re: Row Loop variable

[ Edited ]

Hi Roger,

Can you try

(iGroupIdx<= getSize($iqnList))?getServerFromIQN(getValueAt($iqnList,iGroupIdx+1)):0

in express column?

Re: Row Loop variable

Thanks Karale,


That's what I was looking for..  I need to make it just < instead of <=, but now it works just as I wanted..


Thanks again,