"Accessing the current loop value in 'RepeatUntilOperaterChain'."

ShubhaShubha MemberPosts:139Guru
edited May 2019 inHelp
Hi,

I want to perform a certain number of operations(a combination of operator chains) for say 5 times. And so, I use the operator, 'RepeatUntilOperatorChain'. Now, I need to access the loop value (1,2,3,4,5) in each of the iteration. Can this be done by storing the current loop value in a macro variable or any other similar technique? How can I do this?

Thanks for your help,
Shubha

Answers

  • ShubhaShubha MemberPosts:139Guru
    Hi,

    The above problem was solved as the way below:

    Just before the 'RepeatUntilOperaterChain', I created a dataset which has a single attribute with values from 1 to 5. (Since I know the no. of iterations to run). Then inside the loop, I kept reading the first value of the so created exampleset into a macro variable. And once the value is read into the macro variable, the first example will be deleted off from the dataset, so that in the next iteration, the second value is read and so on....

    But, please let me know, if there are any better ways of handling this...

    Thanks,
    Shubha Karanth
  • haddockhaddock MemberPosts:849Maven
    Hi Shubha,

    Glad to see you've solved it, you could have used macros as you suggested, you can can even use the process log! Ah, choices, choices...
















Sign InorRegisterto comment.