Pass TEMP0001 to next VI Job in chain?

SOLVED

On Sage 100 Advanced 2018, 6.00.5.0. Most of my experience with VI has been rather basic, updating or adding customer accounts, but I also have written scripts to import to Repetitive Invoicing Entry and Cash Receipts. However that is using data that I have manipulated to present in the best way for VI to receive it so this is a new challenge that I'm not sure is even possible.

I am curious to know if there is a way to pass a TEMP value from the first VI job to the next one in a chain. Basically I have orders in a csv file, all order information on a single line (3 items max). Not ideal but that is the way it is presented to me. Rather than require the user to pull it to Access or manipulate the data in any way, my hope is that with chained VI jobs I can create the SO Header (using Next for SO#) and import the first detail line in the first job, then I'd like to pass the existing SO# to the next VI job so it can append the next item to the order, and finally a third VI job would add the last item. At the moment I can import all three items but they go to three separate SO#s as I haven't found a way to store the SO# for use in the next VI job.

I realize this is unorthodox, but complexity on my end would equate to simplicity for the user--which is my goal. The only thing I don't know how to do is pass the SO# from the first job to the second--or how to identify the newly created SO# (there is only one order per customer, or at the very most one order per customer per day--so I would think that identifying the SO# in the second and third jobs would be possible using conditional file assign, but I have not got it to work).

If I'm completely missing something and multiple passes through the order aren't required, I am open for suggestions.

Parents
  • 0
    SUGGESTED

    I'd run a VBScript against the source file to reformat into multiple lines, then three jobs are not required.  You should be able to start the VI job from the script too (having the script put the processed import file in a preset location) to make things easier on the user.

    Alternatively I suppose you could also trigger a VBScript after the first job to query the SO #'s (ODBC), adding to the source file (as a new column) for the subsequent imports... but that would get tricky for the file handling.

  • +1 in reply to Kevin M
    verified answer

    Another option is to have perform logic that will write the info you need to it. Then on the next import you have perform logic to read from that file to get the info you need. You would need to have a unique key that doesn't use the info created from the initial vi.  When the last document is imported you would remove the temp file you created.

Reply
  • +1 in reply to Kevin M
    verified answer

    Another option is to have perform logic that will write the info you need to it. Then on the next import you have perform logic to read from that file to get the info you need. You would need to have a unique key that doesn't use the info created from the initial vi.  When the last document is imported you would remove the temp file you created.

Children
No Data