LarsL
(Lars Langenstueck)
May 4, 2023, 1:19pm
1
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?!)
LarsL
(Lars Langenstueck)
May 4, 2023, 2:19pm
3
Should have led with that. It’s not working unfortunately
check this out
using a string as a collection source
1 Like
LarsL
(Lars Langenstueck)
May 4, 2023, 3:03pm
5
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
LarsL
(Lars Langenstueck)
May 4, 2023, 3:12pm
6
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.
dorilama
(Mariano)
May 4, 2023, 3:12pm
7
No need for workarounds. Try this
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
LarsL
(Lars Langenstueck)
May 4, 2023, 3:16pm
8
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