July 23, 200817 yr Newbies I created a script in a form that takes values from items that are selected and combines those selections into one field. The idea is that the selections automatically generate a file name that will be used for the name of the art file that we are creating. The script looks like this: GetValue( Post Pay Category; 1 ) & GetValue( PO Basics; 1 ) & GetValue( PO Getting Started; 1 ), etc, etc, etc. There are a bunch of 'GetValue' items with the '&' symbol in this script. What is generated is a something like this: PPA12345678B1234567C12345678D. Now what I'd like to be able to do is to take that long file name and truncate it. If you look at the structure of the file name you see 'PP' plus 'A' plus a string of numbers, plus 'B' plus another string of numbers, and so on. In the end, I want the file name to look something like: PPA1-57-8B124-7C1-8D. What that does is take any numerically consecutive numbers and replace numbers with a hyphen. For example, 12345, becomes 1-5. So do you know of any way I can write a script with operators that will take something like 'PPA12345678B1234567C12345678D' and truncate the numbers? Thanks a bunch!
July 23, 200817 yr I have published a custom function that does something very similar with a list of values: http://www.briandunning.com/cf/734 You might apply a similar logic to your problem.
Create an account or sign in to comment