IT Process Automation

Expand all | Collapse all

Database Operator Loop

  • 1.  Database Operator Loop

    Posted 11-23-2018 06:48 AM

    I have a database operator inside a loop and using offset parameter to divide sql query.

    The problem is that I was not able to save results in variables for later use in the second run of loop.

    The way I did, in the second loop variables are being reset and I got an error.

    Someone has an idea on how to create the variables for all the loops.

  • 2.  Re: Database Operator Loop

    Posted 11-27-2018 02:24 PM

    An operator level variable will be reset every time through the loop but a process level variable shoudn't be reset unless your code resets it.

  • 3.  Re: Database Operator Loop

    Posted 11-30-2018 10:11 AM

    Hi paulofreire75,


    As I understood, you need to store the query select information for each loop. Am I right?

    If yes, I recommend you to create or arrays or a valueMap to store all the information you want. Then, at the post-execution code, you do something like this:
    Process.array1[Process.loop1.CurrentLoopIteration] = Process[OpName].QueryResults.ResultSets[0].Rows[0].value1;



    Sérgio Castro