AnsweredAssumed Answered

Help with Text conversion calculation

Question asked by BobSchwenkler on Jul 20, 2009
Latest reply on Jul 20, 2009 by BobSchwenkler


Help with Text conversion calculation




I'm trying to figure out a calculation and having a heck of a time doing so, so I'm turning to the more knowledgeable folks for some help. The idea is pretty simple. We have product codes that vary slightly depending on the type of product. For products where there is more than one option (different size and color t-shirts for example) there is also a suffix added to the base product code (eg. BRAP001-Mint-M, where the base product code is BRAP001). Other code formats are similar to BR011 and CA01


I'm trying to  create a calculation field that will simplify all product codes to their base code to use in relationships. It can be assumed that there will never be more than one grouping of numbers within the code, and also that these numbers will always follow the first 2 or 4 letters. It can also be assumed that there will never be more than four letters at the beginning of the code. The more complex code above is the sort that is really making this difficult for me.


One thing that's making it more difficult is trying to get a count of the numbers using GetAsNumber, which omits leading zeros. Any suggestions/help?