Post

1 follower Follow
0
Avatar

How to convert a string to proper or title case

I see the Upper and Lower functions, but is there a way to convert a string to title or proper case? I’m trying to convert a URL into a task name so that

  www.abc.com/product/product-name/page-name.html

Becomes

  Update: Product | Product Name | Page Name

I’ve managed to get it in all lowercase but would prefer title case as it’s easier to read on reports.

Candice Bell Answered

Please sign in to leave a comment.

3 comments

0
Avatar

Candice, 

I understand the Use Case but it is currently not possible to parse the URL and pull the relevant information as you want it to. The Clarizen Data Model does not currently support Regular Expression method which would make this easy to do.

If you provide the full Use Case, I can submit this as a Change Request

Boris Krutiy 0 votes
Comment actions Permalink
0
Avatar

Hi Candice,

 

As Boris said it is not possible to have a bullet proof logic to do that. If the URL is pretty much the same you can try to use something like: 

ReplaceString(ReplaceString(Mid($URL,InStr($URL,'/')+1,Len($URL)-InStr($URL,'/')),'/',' | '),'-',' ')

There might be some slippage in with the characters, since I haven't tested it thoroughly.

Upper casing the first letter is pretty difficult (even impossible) but it might be possible with very heavy customization leveraging variables, if and only if the URL is pretty much the same structure.

 

Regards and good luck!

Tamir

Tamir Avital 0 votes
Comment actions Permalink
0
Avatar

Thank you both.  Boris, what specifically do you need for the use case?

Candice Bell 0 votes
Comment actions Permalink