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 in reply to David Speck

    It works for more than one line. VI performs some logic whenever Next is used on the key field. It does something along the lines of either comparing the entire header record or the required fields of the header record to the previously read record from the source, if they differ, it commits the previous header record and then starts the new header record with the current record from the source.

  • 0

    Perhaps you could do the import, let it grab new numbers with the leading zero. Then do an update statement in SQL to make the desired change. You could create a stored procedure to make it an easily repeatable task.

  • 0 in reply to David Speck

    Sorry for the delay in my response.  Thank you very much for the help!  This was my first post and I am overwhelmed by the responses.  I was on the right track just needed a little guidance.  I had put "N"+MID({SO_SalesOrderHeader.SalesOrderNo$},2,6).  I guess it was the ",6" that was messing me up. I made your suggested adjustment and worked perfectly.  You rock! Have an awesome weekend!