Script - remove whitespace from the beginning of the text

" Hello Airtable"

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

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

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();
1 Like

This topic was solved and automatically closed 3 days after the last reply. New replies are no longer allowed.