Add Pre-fix to Sales Order Number thru VI Import

SOLVED

Hi,

We are importing orders from a third party into SO Entry via Visual Integrator.  Is it possible to use the "Next" SO number but drop the first digit and add a letter.  For example, if the next available SO number is 0123456, I would like my imported sales order numbers to be 'N123456', 'N123457','N123458' and so on.  Can't figure this out if it possible.

Thanks for any advice.

Kathy

  • 0

    That's a Scott Brady question if I ever heard one.  Contact him through Sage tech support.

  • 0

    What happens if you set the next sales order number in S/O Options to N123456?  I would think the next option in V/I would use N123457 for the next order number.

  • 0

    Maintaining two sequences for orders (one with and one without the "N" prefix) is not possible (AFAIK).

  • 0

    If you were to do it the way you described, you would end up with gaps between your regular sales orders and the sales orders prefixed with "N".

    For example, the next sales order number is 0000123.

    A user enters a sales order and uses the button to get the next number, they get 0000123 and the value in options gets incremented to 0000124.

    Now say you run the import with 3 sales orders in the source and for each order imported, it also uses the get next number function, so you end up with orders N000124, N000125, and N000126 and now the value in options is 0000127.

    So when a user enters a new sales order and uses the button to get the next number, the get 0000127 and the value in options gets incremented to 0000128.

    You are now missing the opportunity to use regular sales order numbers 0000124 through 0000126.

    If you are fine with that, then you should be able to accomplish this with VI and either multiple fields with calculated logic or some perform logic. I don't have a solid answer for you off the top of my head.

    If you don't want to miss sales order numbers, then you could accomplish this by using a User Defined Table (UDT) with 2 columns, 1 to act as a place holder key and the other to hold the incremented number. You could then use scripting or perform logic to get and increment this value from the UDT during the import through VI. Your users could still enter sales order in Sales Order Entry like normal all while using the standard sage 100 functionality to get the next number. This would give you two different sequences which won't interfere with each other.

  • 0 in reply to David Speck

    I've never been able to use a VI formula to calculate a key field that way.  For the "Next" to work, it needs to be called from the SO number field, and once set the SO number cannot be edited.

    It's best if the source system can maintain the alternate sequence #, and VI just imports the value (not using the Next feature).

  • 0 in reply to Kevin M

    Right, i haven't tried this but it might be possible to add the sales order number field first, set its operation to Next, then add it again with an operation of calculated. It might be possible to retrieve the value returned in the first sales order number field by the next operation and then in turn, replace the first character with "N".

  • 0 in reply to David Speck

    Think about how it would fail with a script.  Once the SO # is set, can you SetValue("SalesOrderNo$",calculatedValue) ...?  No, because it is a key field.

    There might exist some sort of Perform Logic to accomplish the goal, but I've never seen anything like it.

  • +1 in reply to Kevin M
    verified answer

    In a script, you would use another SetKey method with the new sales order number.

    My VI idea works in v2018.3.

  • 0 in reply to David Speck

    That is surprising!  But will it work for orders with more than one line?  Or will it create a new SO for each line?

  • 0 in reply to Kevin M

    Good question. Let's find out.