This sample code counts the number of characters in a Text in Text area field. Spaces in the text field are excluded from the count. The final count value is set into a Number field.
The number of characters are counted upon saving the record. The Number field is also un-editable when creating or editing the record.
Prepare the App
Create an App including the following fields and settings.
|Field Type||Field Name||Field Code|
|Text or Text area||Body||body|
|Number||Number of Characters||count|
After saving the settings and clicking on Update App, create a new record in the App. Enter some characters into the Body field, and save the Record. The number of characters should be inserted into the Number of Characters field.