Sage 100

 View Only
  • 1.  Visual Integrator - filtering dataset to import

    Posted 03-24-2025 22:28

    I am importing records from a MS SQL Server table as sales orders to the PO module. Is there a way to filter on the records in the MS SQL Server table that I am importing so I don't have to run through all the records in the table to select the ones I need?

    I am connecting to the MS SQL Server table through ODBC.



    ------------------------------
    Robin Saacks
    Timac Business Systems
    (310) 571-1200 x21
    www.timacinc.com
    ------------------------------


  • 2.  RE: Visual Integrator - filtering dataset to import

    Posted 03-25-2025 08:29

    Could you create a SQL View that points to the Sales Order table and includes the filter and then have ODBC point to the View instead of the table? 



    ------------------------------
    Steve Iwanowski, NextStep Technology Advisors, aka DSD Lancaster PA ¯\_(ツ)_/¯
    ------------------------------



  • 3.  RE: Visual Integrator - filtering dataset to import

    Posted 03-25-2025 12:08
    Thanks for the reply Steve.
    We only know the filter at the time of running the VI job. Is there a way to filter the source dataset from the VI job, rather than running through every record in the VI job to find the selected record needed to be updated?

    Robin Saacks | Operations

    T (310) 571-1200 x21
    C (310) 709-1358
    www.timacinc.com | screen share
    ~ Business Process Automation ~






  • 4.  RE: Visual Integrator - filtering dataset to import

    Posted 03-25-2025 12:24

    It is possible to use perform logic on the On Execution event to modify the SQL statement that gets used by the import job.  The SQL statement used by the import job is stored in a variable called SQL$ so you if your existing SQL statement ends the FROM clause, you can just append your WHERE clause to the SQL$ variable. Make sure to put a space or carriage return and line feed between the table name in the FROM clause and your WHERE clause.

    You can even base your WHERE clause on values entered in temp fields set up as Runtime Assign fields.



    ------------------------------
    David Speck II
    Blytheco LLC
    ------------------------------



  • 5.  RE: Visual Integrator - filtering dataset to import

    Posted 03-25-2025 12:41
    That's great info. Thank you so much David.

    Robin Saacks | Operations
    T (310) 571-1200 x21
    C (310) 709-1358
    www.timacinc.com | screen share
    ~ Business Process Automation ~