:split_by (line_break) doesn't work

Hi,

i’m quite puzzled as it seems that the system doesn’t do what it’s designed to do (or it’s a big misunderstanding from me) :
i want my user to be able to fill a multiline input with multiple lines. Then, i want the user to push a button and the system to be able to treat each line (meaning a sequence of chars ended by a line_break (\r or \n) ) through a Schedule Workflow API on a list.
For that, i’m doing the following :

  • placing a multiline input
  • placing a button
  • creating a backend api workflow with one text parameter that creates a record in a table based upon the text parameter
  • on the button workflow, i set an action as : Schedule an API workflow on a list, and as datasource i set the Multiline A’s value:split_by(line_break)

And when i fill the multiline with several lines (with line breaks) and click the button, the text parameter transmitted to the API workflow is made of one text : all the lines from the multiline input and not a line extracted from it.

Am i doing something wrong or i haven’t understood something or is it a bug ?

Thanks for any hint !

Best regards,

Guillaume

@gmaison

Here is how I usually handle this:

Screen Shot 2021-09-07 at 07.44.37
Screen Shot 2021-09-07 at 07.44.49

I hope this helps!

1 Like

Your solution gave me back only the last word on each line.
I corrected the regex pattern like this : ^.+(\n)
Except that if i use regex101.com, it gives me what i want (each line) but in bubble, it gives me only the first line … as if the global modifier weren’t taken into account …

Any hint ?

@gmaison

Sorry I am trying to figure out another way, because you are right in my case I just needed one word per line.

@gmaison

See if it makes sense and helps you:

1st - Use the find and replace with regex, find \n replace by ;

2nd - Use the split by “;”

1 Like

Use :joinby line_break

That worked perfectly :slight_smile:

Thanks a lot !

1 Like

except that i want to split instead of joining

Glad to help you!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.