So a little ABL help needed. I have a character field where I need to extract a set of numbers from. Starting length is unknown but preceding character is ALWAYS a hyphen and the set of numbers are ALWAYS followed by a comma. I wanted to try substring but I don’t know the start length. I thought of index but I do not know how to write what I need.
This is what I am trying. sourceQuoteLines is a character parameter the series of characters are written to when copying Quote lines in Epicor. I am firing a BPM upon the Quote.CopyLines business object.
Maybe I need a little more help here. I was a little off on what I need to parse. Here’s the contents of the sourceQuoteLines parameter that Epicor builds when copying three quote lines from another quote.
6’28635~7’28635~8’28635
I changed the code to this but now it errors again. Should I be using the hexidecimal equivalent instead?
srcQuoteNum = SUBSTRING(sourceQuoteLines, INDEX(sourceQuoteLines, “"), (INDEX(sourceQuoteLines, "”) - INDEX(sourceQuoteLines, “~”)), “CHARACTER”).
Have you considered the Entry function? You pass the delimited and it parses the sting returning an array. You could then use the Entry function again to split the line from the quote.
I tried this also but I get “Starting position for SUBSTRING, OVERLAY, etc. must be 1 or greater.” in the error log. I did confirm that is a grave accent by the way.
I am struggling with how to loop through the string entry results and getting each individual quote number and line number. Such as quote 28635 line 6; quote 28635 line 7; quote 28635 line 8. This is because I need to find the part number of that quote/line and then relate it to the part number line of the current quote I am copying lines into.