# APM routing list criteria **Category:** [Epicor ERP 9](https://www.epiusers.help/c/e9/7) **Created:** 2016-12-16 16:30 UTC **Views:** 710 **Replies:** 5 **URL:** https://www.epiusers.help/t/apm-routing-list-criteria/36643 --- ## Post #1 by @Kimberley Can you set more than one criteria on a routing list? I want to look at the email address and the Inv Amt. Thanks --- ## Post #2 by @Jim_Lutz I believe only one is possible. In this case, it comes in handy to use a formula on your crystal report and make the text match the background to make it invisible to the eye but visible to APM. --- ## Post #3 by @Kimberley This is the error I am getting when I try to email an AR Invoice using APM. I am guessing I have something set up wrong. My external email is working. ''This key is already associated with an element of this collection'' --- ## Post #4 by @gpayne Below are the scripts I have accumulated doing APM. It is kind of like vb, so you can do lots of things. They have a very complex example in the DL27AdminGuide document. Have you contacted the APM help? They are very good with this. Greg SCRIPT TO VALIDATE EMAIL ADDRESS: If InStr(PropertyValue, "@") <> 0 Then TextOut = PropertyValue end if SCRIPT TO VALIDATE FIELD W/LABEL to LEFT: If InStr(PropertyValue, "Fax:") <> 0 Then TextOut = right(PropertyValue, len(PropertyValue) -5) end if SCRIPT TO VALIDATE FIELD W/LABEL ABOVE: dim line if instr(PropertyValue, "Vendor:") then if instr(PropertyValue,chr(10)) then line = split(PropertyValue, chr(10)) TextOut = trim(replace(line(UBound(line)),chr(13),"")) End if End if SCRIPT TO VALIDATE FIELD W/LABEL to LEFT and email address: If InStr(PropertyValue, "Email:") <> 0 Then PropertyValue = right(PropertyValue, len(PropertyValue) -5) end if If InStr(PropertyValue, "@") <> 0 Then TextOut = PropertyValue end if REMOVE AMPERSAND & PropertyValue = replace(PropertyValue, "&","AND") PropertyValue = trim(PropertyValue) If InStr(PropertyValue, "Method:") <> 0 Then TextOut = trim(mid(PropertyValue, (Instr(PropertyValue,":") +1))) end if If InStr(PropertyValue, "Authorized") <> 0 Then TextOut = trim(mid(PropertyValue, (Instr(PropertyValue,":") +1))) end if If InStr(PropertyValue, "Fax:") <> 0 Then TextOut = trim(mid(PropertyValue, (Instr(PropertyValue,":") +1))) end if If InStr(PropertyValue, "V-Code:") <> 0 Then TextOut = trim(mid(PropertyValue, (Instr(PropertyValue,":") +1))) end if If InStr(PropertyValue, "PO Number:") <> 0 Then TextOut = trim(mid(PropertyValue, (Instr(PropertyValue,":") +1))) end if If InStr(PropertyValue, "Email:") <> 0 and InStr(PropertyValue, "@") <> 0 Then TextOut = trim(mid(PropertyValue, (Instr(PropertyValue,":") +1))) end if dim line dim line1 if instr(PropertyValue, "Vendor:") then if instr(PropertyValue,chr(10)) then line = split(PropertyValue, chr(10)) line1 = trim(replace(line(UBound(line)),chr(13),"")) TextOut = replace(line1, "&","AND") Please Confirm receipt and acceptance of Purchase Order {PO #} attached You may have this PO entered as our reference number {OSAS PO} Thank you. {Buyer} {Buyer Email} PO Date {Order Date} Invoices for {Date} Attached are Invoice for {CustName} from {date}. If you have questions please reply to this email. Thank You, Name Company --- ## Post #5 by @Jim_Lutz @Kimberley, this error sounds like some sort of issue with the key rather than routing or emailing. Perhaps you've already used the invoice number as a key for another document type? --- ## Post #6 by @Kimberley Yes I have. I have a document that have been formatted two different ways. I figured since it was identified differently it could use the same key. thanks --- **Canonical:** https://www.epiusers.help/t/apm-routing-list-criteria/36643 **Original content:** https://www.epiusers.help/t/apm-routing-list-criteria/36643