Skip to main content
Question

If there a way to use a formula field to calculate the number of characters in a text field?

  • September 8, 2018
  • 0 replies
  • 222 views

I have a multi-line text field that contains SKUs (letters, numbers, and hyphens).

I want a character count of this field. How is this accomplished?

If the hyphens are a problem, I can account for them separately and a letter/number count would still be extremely helpful.
This topic has been closed for replies.

  • Registered
  • September 8, 2018
Hello, the function is length. Let me know if this helps.

Length([Text Field])

  • Author
  • Registered
  • September 8, 2018
Thank you for your response. This is definitely getting me closer.

More context for my exact goal - my users paste in values like the ones below.

29945-0059 59676-0001 59676-0000 59676-0003

- Each 10-character string represents a different product. 
- I want to figure out how many they pasted in. 
- The example above should return "4". 

My plan was to get a character count and divide by 10 (since there are 10 characters in each product code). The Length function includes extra characters (not sure if they are spaces or line breaks) which is messing this up. 

Any way to get rid of extra characters? Or just count the hyphens? 

I really appreciate help.