We recommend switching to the latest versions of Edge, Firefox, Chrome or Safari. Using Internet Explorer will result in a loss of website functionality.

Do While Example (d360)?

Comments

4 comments

  • Avatar
    Gerard Cafaro

    Node examples are found within the product's installation directory:

    <install home>/docs/samples/nodes/

    These are standard LNA files (data flow exports) that can be imported. There's around 70 or so examples, which include the Do While node.. 

    Also, within the in-product help, there's a walkthrough of how the Do While node works. You can access this by:

    1. Drag and drop the Do While node to the canvas
    2. Click on the node, and within its properties pane near the top, look for Type: Do While  and click the hyperlink to your local doc

    The above steps can also be performed on other nodes for more detailed information. 

     

    0
    Comment actions Permalink
  • Avatar
    Geoff

    I dont think i can access that folder.. im checking. But I asked because the sample that it points to, uses Brainscript...

    UPDATE: i found the samples, and these also still use brain script... is this correct? Shouldnt these have been updated like other nodes?

    # Set condition to true on the first pass
    if (firstExec) then condition = true
    
    #Increment count by 1
    emit 'count' + 1 as count
    			
    # check if the condition is matched
    condition = condition and (20 > 'count')
    			
    # After all records are processed, check if the condition is still true.
    if (lastInGroup and condition) then {
    # If the condition is still true, set returnCode 101 to # reschedule the node and continue iteration. setSuccessReturnCode(101) }

     

    0
    Comment actions Permalink
  • Avatar
    Adrian Williams

    Unfortunately, the Do While and Do While Conditional nodes still require the use of the legacy scripting language rather than Python.

    You can however include Python-based nodes in nodes that are within the loop.

    The attached data flow provides equivalent examples that utilize current nodes instead of the Superseded nodes in nodes in the loop.

     

     

    Attached files

    Example Do While Nodes - 2 Feb 2021.lna

     

    0
    Comment actions Permalink
  • Avatar
    Adrian Williams

    You can also use looping constructs within a Transform node to perform some repeated actions.

    0
    Comment actions Permalink

Please sign in to leave a comment.