Posted Fri, 28 Jun 2024 15:26:20 GMT by Daryl Foxhoven
Customer has a Material Ticket that get's scanned in with a Unique Ticket #.  Later, vendor will send an invoice for all Material Tickets.  What I'm trying to do is update the Material Ticket with the Invoice # from the vendor using the Ticket # which is the Match Code on the Material Ticket and also occurs on the Invoice.  My issue is the Material Ticket # is in a table field for the INvoice as there are many ticket #'s that the invoice is for.  I created a Workflow and is trying to update the Material Ticket when an invoice is scanned using an Assign Data, and I'm going out to the File Cabinet, looking for a Material Ticket that listed in the table field...however, it keeps erroring out.  I've tried the following and with the resulting error message:
DW_DOCUMENT_TYPE = 'Raw Material Ticket' AND DW_TICKET_NUMBER LIKE &"%"GV_Ticket_Number_Expense&"%"
 
Error in system activity: [1: FileCabinet Id: d69e99e9-90c7-4745-8734-94f2edf3804e, Column: HAULER_INVOICE__] Incorrect syntax near '&'.

Created an arithmetic expression to assign the following "%" + GV_Ticket_Number_Expense + "%" to GV_TempTicketVar1
Then in my Assign To used the following: DW_DOCUMENT_TYPE='Raw Material Ticket' AND GV_TempTicketVar1 like DW_TICKET_NUMBER

Error in system activity: [1: FileCabinet Id: d69e99e9-90c7-4745-8734-94f2edf3804e, Column: HAULER_INVOICE__] [1: Filecabinet] FileCabinet destination has 0 or more than 1 records

There's only 1 Material Ticket in the system...so I feel like I have something backwards where because there's more than 1 ticket # in my table...it's giving me this error. 

Any assistance would be appreciated!!
 
Posted Tue, 02 Jul 2024 08:24:46 GMT by Simon H. Hellmann Toshiba Tec Germany Imaging Systems GmbH IT-Consultant Document Management Solutions
Hello Daryl Foxhoven, 

if the ticket number is unique and the same on the ticket and the invoice, why do you need to to a LIKE fuzzy search? Could you not just check if it is equal?

Also, what value does GV_Ticket_Number_Expense have here? It should be just one single ticket number. You might need to loop over all the table rows and process them one after another.

Last: Are you sure that there is no other document with the same ticket number, for example the invoice in the workflow? You could exclude the invoice by adding AND DW_DWDOCID <> GV_DWDOCID.

Hope this helps. 

Greetings from Germany,
Simon H. Hellmann
DocuWare System Consultant

You must be signed in to post in this forum.