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

if field is populated then....

Comments

2 comments

  • Avatar
    Gerry Mullin

    If I understand the above right, you want the Aggregate node to run on either:

     

    1. There's no new file found today, so we will just process a common file we have saved somewhere.

    2. There is a file found today, therefore we want the new records in it that are not in the common file, i.e. the difference between the files.

     

    I made attempt at doing this without a metacheck, it could be debated which method is preferred.

     

    1. The data flow will read in CommonFile.xlsx regardless of anything.

    2. The data flow will try to find TodaysFile.xlsx, maybe it exists maybe not. 

    3. We will figure if step 2 is true or false (Transform node: Figure out which file to use).

    4. If step 3 is true, we'll keep the data from step 1 (Lookup node: Only have values when TodaysFile is found).

    5. If step 3 is false we drop all the data from step 1 (Lookup node: Only have values when TodaysFile is found).

    6. If step 3 is true we will also read TodaysFile.xslx (Excel node: Process Either Generic File or Todays File)

    7. If step 3 is false we will process a second time CommonFile.xlsx (Excel node: Process Either Generic File or Todays File). Remember in this scenario we have 0 records coming out of our CommonFile.xlsx Excel node that will always run.

    8. We merge the data on whatever our common fields are. 

    9. The left orphans of the merge will now always contain either all of the CommonFile.xlsx data or the difference between CommonFile.xlsx and TodaysFile.xlsx.

    10. Perform next step of the logic that is common to both paths (Aggregate node: This input will have all the GenericFile Records OR updates between GenericFile vs TodaysFile).

     

    Hope that helps.

     

     

     

    Attached files

    Replace Metacheck - 16 Jan 2020.lna
    TodaysFile.xlsx
    CommonFile.xlsx

     

    0
    Comment actions Permalink
  • Avatar
    Geoff

    thats a creative solution! thank you!

    0
    Comment actions Permalink

Please sign in to leave a comment.