list iterator index

hi i am trying to get the count of the list iterator i can see it in the raw results but not in the output varibles. like to check is there anywat to get the index value. 

Under raw result, there is index = XX

listIterator.png

Do not see index in the selection list. 
listIterator2.png

Parents Reply Children
  • Hi,

    in the case of this the scriptlet is simple:

     

    index = scriptletContext.get("index");
    if( index == null) { index = 0} else {index = Number(index) 1};
    scriptletContext.put("index",index);

     

    Where you should replace the variable name index with whatever suits your needs in order to not confuse it with the operation's index result).  

    Regards,

    Vlad