New Formula Please: TitleCase() -> Turn Any Text Into A Title

MultiTech
Participant V

Let’s admit it…
sometimes users don’t enter things exactly the way we’d like.

3X_b_2_b25342b7ca0819ae119f48f6df6603095479201f.jpeg

To help clean up some of the text users enter, it would be helpful to have a way to Title Case text they enter.

  • The Name field automatically does this (by nature of holding name information, and names are always Title Cased)

So from a field that’s holding text for a title:
[Somethings_Title] = "My title here"
To this:
TitleCase([Somethings_Title]) = "My Title Here"

More info about Title Case


My Specific Use Case

I’m building a PDF template, and using items entered into the database as section headers, groupings, etc.; when people don’t entering things in Title Case, using that data for labels can make the whole document look a little… cheap.

3X_e_9_e93c96401efa99b88a47ba374d706eb42ecef984.png

  • Things look especially bad when you mix Title Case with NON-Title Case (like the Codling moth average at the bottom)

Why not just use the Name column type? (Since it Title Cases things already…)

  • Because the app will try to auto-suggest previous names you’ve entered into forms.
    • Your device, your phone, will see a field marked for name collection and say, “Oh hey, I can be helpful here and suggest stuff for you!”
  • But I don’t want a person’s name inside the field that stores the name of an Insect… or a Field, or a Building, or a city, tower, picture, cup, product, order, etc. - any field OTHER than a person’s name I wouldn’t use the Name type.
    • Even for a customer’s name, I don’t use the Name column because the data it’s going to suggest will be MY name - data pulled from my Google account from when I’ve previously entered my name into fields.

Being able to take any data and convert it into a Title would help round out some of the hard edges.

As always, thanks for considering 3X_d_5_d51363a862e7ab883241c312ac5d7f271579cdd3.gif

Status Open
5 3 394
3 Comments
yoshi
New Member

Excel and Google sheets have a related function called “Proper” satisfying your idea.
https://support.google.com/docs/answer/3094133?hl=en

It is ideal if the same function can be used in AppSheet too.

PROPER(“google docs”) = Google Docs
PROPER(“gOOGLE docS”) = Google Docs
PROPER(“googledocs”) = Googledocs

Status changed to: Open
Pratyusha
Community Manager
Community Manager
 
josebadilla
Participant I

I think that the formula could do something like this:

TitleCase([Some Title]) =

Upper(MID(Index(Split([Some Title]," "),1),1,1))&lower(MID(Index(Split([Some Title]," "),1),2,20))&" "&
Upper(MID(Index(Split([Some Title]," "),2),1,1))&lower(MID(Index(Split([Some Title]," "),2),2,20))&" "&
Upper(MID(Index(Split([Some Title]," "),3),1,1))&lower(MID(Index(Split([Some Title]," "),3),2,20))&" "&
Upper(MID(Index(Split([Some Title]," "),4),1,1))&lower(MID(Index(Split([Some Title]," "),4),2,20))&" "&
Upper(MID(Index(Split([Some Title]," "),5),1,1))&lower(MID(Index(Split([Some Title]," "),5),2,20))