LAE

 View Only
  • 1.  Switch doesnt work as expected... Alternative?

    Employee
    Posted 05-14-2019 06:08

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

    Originally posted by: StaticFX

    I have 2 files

    File A is always present (csv)
    File B is sometimes present (xlsx)

    is there a way to choose with path to use depending on if File B is present?
    Essentially, File B is used to filter (Xref) File A... then that output is used.. but if not there, then Just use File A


  • 2.  RE: Switch doesnt work as expected... Alternative?

    Employee
    Posted 05-14-2019 06:38

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

    Originally posted by: stonysmith

    The Excel node, by itself, will fail if you specify a hard-coded name for a file that doesn't exist.
    The way around that is to use a DirectoryList node in front of it - that way Excel will simply return zero records

    Then, create a dummy StaticData node that has the columns you require from the Excel, and use the CAT node to force those columns into the stream.

    Attached is a sample.
    Handling Missing Input.brg


  • 3.  RE: Switch doesnt work as expected... Alternative?

    Employee
    Posted 05-14-2019 07:16

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

    Originally posted by: StaticFX

    that part is all fine.. i am using it. the problem is after it.


    CSV file > Filter > Filter > Sort \/>--------------->Switch> output
    | |
    | |
    |---- XREF ---------
    XLS file > -------------Sort--------



    i couldn get an image to work.. lol

    CSV to the switch always wins so it just goes thru..
    I need it to take the XREF path with the XLS file has data/exists

    Can something go in between the CSV sort and switch that will disable if the XLS file loads?


  • 4.  RE: Switch doesnt work as expected... Alternative?

    Employee
    Posted 05-14-2019 07:17

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

    Originally posted by: StaticFX

    Capture.JPG

    wait got it... in the picture case it should only use the APFEED file..

    here it should use the XRef path
    Capture2.JPG


  • 5.  RE: Switch doesnt work as expected... Alternative?

    Employee
    Posted 05-15-2019 07:22

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

    Originally posted by: StaticFX

    Only way it works so far is to use a sleep timer, which is not going to be reliable.
    i mean, i suppose I could use a metacheck.. but then to have to entirely different streams would be crazy. a LOT happens outside of the starting composite


    EDIT:
    well i got it to work by going even higher up. I took Scenario A and put it into a composite
    and Scen B in another...
    then the Directory and file checks feed to 2 metachecks for a certain field.. each feeds into its own composite.
    While its not ideal, it works! lol

    THanks!


  • 6.  RE: Switch doesnt work as expected... Alternative?

    Posted 02-23-2022 14:18

    Hi,

    I have a similar issue to the above but for nodes rather than for files. 

    Let's say I have 3 nodes called A, B and C. Node C is dependent on the completion of either node A or node B. So either A or B will complete at runtime but never both as they are parallel flows in the data flow and cannot be made sequential. I want to put a run dependency so that node C executes if A or B complete. 

    I expected the run dependency "ReRun on event from" to be able to help but it doesn't seem to work. 

    Any suggestions?

    Thanks

    Scott