Sage 100

 View Only
Expand all | Collapse all

VI Success/Failure Perform Logic - v2017

  • 1.  VI Success/Failure Perform Logic - v2017

    Posted 11-18-2019 13:47
    Do the recent versions of Sage 100 no longer have the ability to use Success/Failure Perform Logic?  I'm currently working with v2017.  Are there other options for this functionality?  We want to rename/move our VI import source file, but in one manner if the import succeeds, and another manner if it fails.  It appears 'On Completion" is the closest Perform Type available.

    ------------------------------
    - Brett
    ------------------------------


  • 2.  RE: VI Success/Failure Perform Logic - v2017

    Posted 11-18-2019 14:03
    Here's my current .bat file that I'm using for VI Perform Logic.  Is it feasible to incorporate additional logic so that it does a slightly different rename process if the import fails?

    ! Slade Hornick
    ! Rename the source file
    !
    ! Put the Import file in something more manageable
    ! f$=vi2_import_file$ (from slade's orig)
    f$=ImportFileName$
    !
    ! Parse out the directory
    f_dir$=f$(1,pos("\"=f$,-1))
    !
    ! Parse out the file
    f_file$=f$(pos("\"=f$,-1)+1)
    !
    ! Try to create the old directory - if it exists, then move on
    directory f_dir$+"old",err=*next
    !
    ! Close the source file, before trying to move it
    close (1,err=*next)
    !
    ! Create a name for the new file
    f_new$=f_dir$+"old\"+dte(0:"%Y%Mz%Dz-%Hz%mz%sz")+".csv"
    rename f$, f_new$
    ! pause
    exit

    ------------------------------
    - Brett
    ------------------------------



  • 3.  RE: VI Success/Failure Perform Logic - v2017

    Posted 11-19-2019 10:41
    Brett - I use a similar process I call 'MoveToPosted', but essentially does the same thing...  I would also be interested to discover some flag that indicates success or failure of an import.  Armed with that, creating different rename logic should be easy.

    ------------------------------
    Randy Marion
    ------------------------------



  • 4.  RE: VI Success/Failure Perform Logic - v2017

    Posted 11-19-2019 13:11
    I'm a bit surprised that it appears that not many folks have needed to address this, especially since this functionality in VI used to be there.  This kinda reminds me of when Sage took away the +AddValue Oper in VI.

    ------------------------------
    - Brett
    ------------------------------



  • 5.  RE: VI Success/Failure Perform Logic - v2017

    Posted 11-19-2019 14:14
    ACK - don't go there!  I miss that!

    ------------------------------
    Beth Bowers
    Mom to Samson, Peanut, ChiChi, Canton, Cagney and Daisy (NO Oxford comma - shriek!)
    Beth Bowers
    269-445-1625
    ------------------------------



  • 6.  RE: VI Success/Failure Perform Logic - v2017

    Posted 11-19-2019 14:21
    Which, @Beth Bowers?  The Success/Failure perform logic options or the +AddValue Oper?​

    ------------------------------
    - Brett
    ------------------------------



  • 7.  RE: VI Success/Failure Perform Logic - v2017

    Posted 11-19-2019 14:45
    +Add (sniff)

    ------------------------------
    Beth Bowers
    Mom to Samson, Peanut, ChiChi, Canton, Cagney and Daisy (NO Oxford comma - shriek!)
    Beth Bowers
    269-445-1625
    ------------------------------



  • 8.  RE: VI Success/Failure Perform Logic - v2017

    Posted 11-19-2019 16:04
    I just spoke with Matthew in Sage Support.  He didn't have any options/solutions except for possibly the below Blytheco enhancements (plus I just realized DSD also has something similar - below), but he did ping Scott Brady at my request - so I'll post back once I hear back.  And although the Help does specifically list the available Perform Types, there's still remnants of apparently very old Help articles that provides a false sense.

       DSD - VI-1001 Enhanced Visual Integrator Log
       Blytheco - M9-VI-1002 - VI Email Notification Utility
       Blytheco - M9-VI-1001 - VI Log Archive Utility



    ------------------------------
    - Brett
    ------------------------------



  • 9.  RE: VI Success/Failure Perform Logic - v2017

    Posted 11-19-2019 16:27
    The problem I'd have with any feature is the definition of "success" vs "failure".  Failed Records?  What about imported with Invalid Fields?  Sometimes that is OK, and sometimes not.

    ------------------------------
    Kevin Moyes
    Technical Systems Analyst
    Munjal White Consulting Co.
    Toronto ON
    ------------------------------



  • 10.  RE: VI Success/Failure Perform Logic - v2017

    Posted 11-20-2019 11:13
    During VI Completion Perform-logic, In memory, there is a variable called RecordsFailed
    If it is 0, then success, if not 0, then failure.

    ------------------------------
    Lee Graham
    Friendly Systems, Inc.
    ------------------------------



  • 11.  RE: VI Success/Failure Perform Logic - v2017

    Posted 11-21-2019 08:41
    Thanks, @Lee Graham!  Any hints on how I can leverage that within VI Perform Logic?​

    ------------------------------
    - Brett
    ------------------------------



  • 12.  RE: VI Success/Failure Perform Logic - v2017

    Posted 11-21-2019 11:14
    Brett,    I guessing something like:  If RecordsFailed=0 ! success logic else ! failed logic  Lee 
    --

    Friendly Systems, Inc.

    Sage 100 (Mas90/200), Sage 300 (Accpac), SageCRM
    Visit us on the web at www.friendlysystems.com
    Office:?? 678.273.4010 ext 4
    Mobile: 404.202.9065
    Fax:?????????? ??678.273.4012
    See our blog at www.friendlysystems.com/blog



    ------Original Message------

    Thanks, @Lee Graham!  Any hints on how I can leverage that within VI Perform Logic?​

    ------------------------------
    - Brett
    ------------------------------


  • 13.  RE: VI Success/Failure Perform Logic - v2017

    Posted 11-21-2019 12:17
    A few other useful variables i found in a simple CI_Item import during an "On Completion" perform logic script are;
    JOBNAME$="NEW ITEM"
    JOBTYPE$="I"
    COMPILEDNAME$="VIWI01"
    LASTCOMPANYCODE$="XY2"
    TABLENAME$="CI_Item"
    IMPORTFILENAME$="C:\Sage\Sage 100 Advanced 2018\MAS90\Home\TextOut\ABXItems.csv"
    DATASOURCEONHOST$="N"
    tmpFileName$="ABXItems.csv"
    tbl$="C:\Sage\Sage 100 Advanced 2018\MAS90\Home\TextOut\ABXItems.csv"
    RecordNo$="0000000005" // (I believe this will indicate the last record number read)
    pfx$="C:\Sage\Sage 100 Advanced 2018\MAS90\"
    logName$="C:\Sage\Sage 100 Advanced 2018\MAS90\VI\VIWI01.M4T"
    saveRecordTotal=5
    RecordsFailed=4
    RecordsPassed=1
    RecordsPassedInvalidFields=1
    RecordTotal=5
    headerRecordNo=5


    ------------------------------
    David Speck II
    Tennessee Software Solutions
    ------------------------------