top of page

Espocrm Formula String Upper Case First Letter

Updated: Apr 22

Are you tired of manually capitalizing the first letter of every name entry in your EspoCRM system? Do you find yourself wishing for a quick and efficient solution to streamline this process?


Espocrm Formula String Upper Case First Letter


Let's break down the formula script:

// Espocrm Formula String Upper Case First Letter
// ex: name = hello world.
// $firstLetterUpper = H

$firstLetterUpper = string\upperCase(string\substring(name, 0, 1));

name = string\concatenate(
    $firstLetterUpper, 
    string\substring(name, 1) // the rest of the name string
);

Here's how it works:


  1. We define a variable $firstLetterUpper to store the uppercase version of the first letter of the input string name.

  2. Using the string\substring function, we extract the first letter of the name string and convert it to uppercase using string\upperCase.

  3. Then, we concatenate the uppercase first letter with the rest of the name string, starting from the second character.

  4. Finally, we assign the modified name back to the original variable name, ensuring that the first letter is capitalized.



110 views2 comments

2 Comments


Unknown member
Jan 24, 2023

😀

Like

Unknown member
Jan 24, 2023

thanks

Like
bottom of page