Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How to do Titlecase without losing ALLCAPS words

MIA1
5 - Atom

I have a set of data and the input can be inconsistent with upper and lower case. I would like to set the first letter of each word to be a capital, but without changing the words that are in ALLCAPS (which Titlecase changes). The strings are of variable length and number of words, and the ALLCAPS words also vary.

 

e.g

NowBecomes ...
Red appleRed Apple
red AppleRed Apple
Red AppleRed Apple
yellow Spotty ballYellow Spotty Ball
Yellow spotty ballYellow Spotty Ball
Blue DOGBlue DOG
blue DOGBlue DOG

 

Any help would be much appreciated!

5 REPLIES 5
CharlieS
17 - Castor
17 - Castor

@MIA1

 

I have attached a solution that works by evaluating each word to see if it case-sensitive matches an uppercase forced version of itself.

 

Let me know if you have any questions!

 

sreejithmp
8 - Asteroid

Hi

There is another way using data cleansing tool .

Please find the below

BenMoss
ACE Emeritus
ACE Emeritus

Hi!

As a leader in the Alteryx Community, I have the ability to identify & mark accepted solutions on behalf of community members - and recently did so on this thread. If you have any questions or concerns with the solution(s) I selected please let me know by replying to this post.

Learn more about Accepted Solutions here.

Thank you!

mxledesma
7 - Meteor

Hi

 

I saw your workflow but I do not understand the following:

 

IF Contains([Now],uppercase([Now]),0)!=-1 THEN titlecase([Now])
ELSE [Now] ENDIF.

 

I do not understand the what is inside the contains equals to -1?

Can you explain. 

 

Also, why is uppercase([Now],0) what is 0?

 

Michael Ledesma

markcurry
12 - Quasar

The part of the formula, Contains([Now],uppercase([Now]),0)  is simply checking if the field [Now] is all in uppercase or not.  If they are the same it will return -1 for True, or 0 for false.    So the full function sets it to Title case, if the field is not already in Upper case, otherwise leaves it as it is, (which will be in uppercase). 

 

The easiest way to see what's it doing is to put the Contains([Now],uppercase([Now]),0) in a separate formula tool.

Labels