Data360 Analyze

 View Only
  • 1.  Do while with decrement

    Employee
    Posted 05-17-2021 03:38

    Hi support team,

    I have a do while conditional node solution from the previous versions of the tool, however all the examples, provided for the newer versions, are working with increment and my solution is based on decrementing the iterations (while ID >0 do something).

    My original solution uses the code:

    if firstExec then
    {
    FileDelay = "1".int()
    FileDelayMS = FileDelay * 1000
    sleep(FileDelayMS)
    }
    emit *
    where not firstExec

    This code was converted from a Filter node from the previous versions to a Transform node, but I'm unable to make a dependency with an excel output node (I think because this decrement node was converted and the append excel, which should be the trigger, was taken from the newer version's built-in nodes).

     

    Could you please advise me how to setup the do while conditional node to decrement the ID for the next iteration?

    Thanks, Tamas



  • 2.  RE: Do while with decrement

    Employee
    Posted 05-18-2021 01:22

    The Do While node continues to use the legacy Lavastorm scripting language at this time so a script to decrement the initial input value within a Do While Conditional node loop would be something like the following:

     

    When using a Do While node with the decrement logic in a Transform node the Python code would be similar to this: