Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 5968 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies
Posted

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!

Posted

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.

This topic is 5968 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.