Space as Delimiter in Formula

Hey there,

I am trying to break line items in a long text field into separate items and turn them into an array.

The Split function is doing exactly that.

Unfortunately, the line breaks are not shown as /n as usual, but as spaces.

I have no clue how to use space as a delimiter in this case.

Here is the simple formula:

split(Form Input,SPACE?!)

split(form input, ' ')

Should have led with that. It’s not working unfortunately

check this out

using a string as a collection source

1 Like

I wonder why it’s not working for me. It must have something to do with the input form.
It’s not recognizing the spaces apparently. When I use other delimiters (like https or anything other than the space), it’s working.

Can only add one image. Tried both your versions with the same result. Not working

I fixed it by building a workaround.

I saved the form input into a text variable and in the next action used that variable and split that.

Turns out, once saved as text variable it actually turns the line breaks into \n.

Works like a charm now.

No need for workarounds. Try this
image
the second parameter of the function is actually /\s/, do not add other spaces in the middle. It’s probably better if you use the javascript view for this case

3 Likes

Perfect!

This works!

I never worked with Regex, tried earlier a few things including this, but without enclosing it in //…

Feels like it’s time to finally do a crash course in Regex.

Thanks a lot!

1 Like