First letter of a sentence uppercase + remove empty spaces before and after
Hello
I“d like to have the first letter of the first word of a all text fields in capital letter, as well as removing extra spaces at the begining and at the end. For example ” specialized in functional training “ would become ”Specialized in functional training“.
How could I achieve that both for the new records and to apply this rule on the existing records?
Many thanks
Gregory
4 replies
- 
  This is probably the easiest way... let trimStr := trim(YourString);upper(substr(trimStr, 0, 1)) + substr(trimStr, 1)
- 
  Thanks Sean! Should I put this in the “Trigger after update” field? I tried but it doesn“t work: 
- 
  Gregg, If you put the code in “Trigger after update”, it will only run if the field has been modified. For existing records you will need to use “Update multiple records” or a button. It looks like you need to make a small addition to the code... let trimStr := trim(“Benefits (English)”);“Benefits (English)” := upper(substr(trimStr, 0, 1)) + substr(trimStr, 1)Did you use the “Insert/edit image” forum function to upload the images or something else? 
- 
  Thanks Sean, it works perfectly now! Nope, I copy/pasted links of images from pastimages.org. Seems that it didn“t work. 
Content aside
- 4 yrs agoLast active
- 4Replies
- 618Views
