LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  CAT node unexpected behaviour - default all incoming input into first input pin

    Employee
    Posted 01-24-2017 09:33

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: jpstory

    Hi

    CAT node and Append Excel node both demonstrated unexpected behaviour when I tried to connect multiple upstream Filter nodes into them.

    These Filter nodes are created by pasting the underlying script direclty into the canvas ( the codes are deviced via spreadsheet) rather than via normal means, I think that might be the source of my problem, but don't know how to correct it.

    The reason why I skip the normal means of creating nodes is becaseu I need to output test results on 1000+ fields (X = 1 to 1000):

    emit *
    where Field X == "Fail"


    To avoid creating Filter node and typing the above code 1000 times, I simply deviced the underlying code in a spreadsheet and paste it into the canvas to create 1000 filter nodes.

    The code successfully genereated the filter nodes and connected to the output pin of the upstream node that I aimed for.

    However, when I tried to "consolidate" the output of these Filter nodes via a CAT or Append Excel node, instead of seeing one Filter node being connected to one inputpin of the CAT node, I see the first Filter node automatically being connected to all the available input pins of the CAT node.

    I figure it must have something to do with the fact that the Filter nodes' output pins' address are identical, but I do not know how to generated a unique output pin address for each individual Filter node.

    Here is a simple of 2 Filter nodes:

    "node:Filter
    bretype:core::Filter
    editor:Label=cRecord_Type
    editor:sortkey=58866b4020341b68
    input:@40fd2c74167f1ca2/=^.5886500d783f701f
    output:@40fd2c7420761db61/=
    prop:Script=<<EOX
    emit *
    where 'Field 1'== ""Fail""
    EOX
    editor:XY=280,190
    end:Filter"
    "node:Filter
    bretype:core::Filter
    editor:Label=cOrder_Event_Type_Code
    editor:sortkey=58866b4020341b68
    input:@40fd2c74167f1ca2/=^.5886500d783f701f
    output:@40fd2c7420761db62/=
    prop:Script=<<EOX
    emit *
    where 'Field 2' == ""Fail""
    EOX
    editor:XY=488,190
    end:Filter"


  • 2.  RE: CAT node unexpected behaviour - default all incoming input into first input pin

    Employee
    Posted 01-24-2017 09:48

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    Every node needs a unique Handle and Sortkey
    Remove this line from all the nodes and see if it helps:
    editor:sortkey=58866b4020341b68


  • 3.  RE: CAT node unexpected behaviour - default all incoming input into first input pin

    Employee
    Posted 01-24-2017 09:55

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    Also.. can you explain a bit why you need to split the data into separate streams?
    There might be some better way to deal with it.


  • 4.  RE: CAT node unexpected behaviour - default all incoming input into first input pin

    Employee
    Posted 01-24-2017 10:18

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: jpstory

    Hi stonysmith

    thanks for looking at this.

    I tried removing the line the problem still persited.

    The reason why I am doing it this way is becasue of the end user's request (can't change that).

    In essence, the test is a completeness test where you check each record to see which field is populated and which one is not.
    The user is intereted in looking at the underlying records per field where the test failed (for example, all the records that have Field ABC not populated), rather then looking at the each records to see which field not populated.


  • 5.  RE: CAT node unexpected behaviour - default all incoming input into first input pin

    Employee
    Posted 01-24-2017 10:29

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    Well.. what if you added a column to the data that indicated which column is "Fail", put it all into one spreadsheet together, and let them sort the result?


    Try this code in a filter:

    output 1 {
    emit FailField=""
    emit *
    where false
    }
    
    names=inputFields(1)
    i=0
    while i<len(names) {
     if field(names[i]).str()=="Fail" then {
      do output 1 {emit names[i] as FailField}
      }
      i=i+1
     }


  • 6.  RE: CAT node unexpected behaviour - default all incoming input into first input pin

    Employee
    Posted 01-24-2017 10:34

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: jpstory

    Thanks, will try your suggestion, hopefully the end user would accept it.


  • 7.  RE: CAT node unexpected behaviour - default all incoming input into first input pin

    Employee
    Posted 01-24-2017 10:41

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: stonysmith

    It's not that we can't make the other method work.. I was just trying to offer something quick and simple.