Forum Discussion

PamelaKopterska's avatar
Qrew Member
5 years ago

Capital Letters

Hi All,

I need to extract Capital Letter from the string. My field is called Fullname and the format is like NameLastname. My task is to separate it by adding "." after Name. Is there some kind of function similar to Split() but based on upper and lower case? 

Pamela Kopterska

3 Replies

  • AustinK's avatar
    Qrew Commander
    I've been thinking of what you could do for this but there are so many different edge cases that it seems like it would be impossible with just Quick Base. What if a user entered their middle initial? Or had a name like RonaldMcDonald, where the last name has 2 capitals.

    You might be able to make a monster formula to do this but it would be ridiculously huge I think. I would explore using an Excel formula to do this, just be mindful of the edge cases like I mentioned above. You could also take the excel formula and attempt to make it into a Quick Base formula.

    If you do it this way you will need to fix whatever is causing you to get the bad names like that. You really really should have a delimiter character in there to help with issues like this. I have always used separate first and last name fields because you can then just make a formula field to concatenate them together if you need that and it will be formatted the exact way you need.
  • Hey Pamela,

    Thanks for the fun challenge! Great way to get my brain warmed up for a day of App building.

    var text one = NotLeft([Name Text], 1);
    var number firstNameLength = Length(Left($one, "ASDFGHJKLZXCVBNMQWERTYUIOP"))+1;
    var number lastnamelength = Length([Name Text])-$firstnamelength;
    Left([Name Text], $firstnamelength)
     & "." &
    Right([Name Text], $lastnamelength)​
    What this will do is insert a period before the first capital letter that is not the first character in the text string.

    "RonaldMcDonald" becomes "Ronald.McDonald", but "HRGieger" will become "H.RGeiger".

    Hope it helps, and if you need any more assistance, the team at Data Collaborative handles this kind of thing and more all the time!

    - Sam

    Sam Jones
    Vice President, Product and Technology

    The Data Collaborative, Inc.
    366 Massachusetts Ave, Suite 203 | Arlington, MA 02474
    • AustinK's avatar
      Qrew Commander
      Nice I was looking at the formula references and I was thinking of something much larger. I have never run into this issue because I always split my names and do not do full names so I have never even had to consider this. Glad to see it actually can be done in a native way that wasn't as large as I thought it might be.