Help

Re: Script - remove whitespace from the beginning of the text

Solved
Jump to Solution
1310 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Ujval_Shah
5 - Automation Enthusiast
5 - Automation Enthusiast

" Hello Airtable"

  • need to remove initial white-space from the text in the script.
1 Solution

Accepted Solutions
Vivid-Squid
11 - Venus
11 - Venus

It sounds like you are putting this in the scripting block. This formula will only work in a Formula type column.

Without knowing what your script is you can try something like:

let text = "       Hello World!        ";
let result = text.trim();

See Solution in Thread

3 Replies 3

Hi @Ujval_Shah ,
You should be able to do this with a formula field with TRIM(string)

It’s throwing error.

ReferenceError: TRIM is not defined at main on line 2

Vivid-Squid
11 - Venus
11 - Venus

It sounds like you are putting this in the scripting block. This formula will only work in a Formula type column.

Without knowing what your script is you can try something like:

let text = "       Hello World!        ";
let result = text.trim();