Save data by iterating over text

Hi everyone, i’m trying to find a way to perform this action, but i didn’t find anything on the forum.
I want to give to my bubble app a list of links in form of text, each other separated by new lines, like this

“link1
link2
link3
link4”

I would like to paste this in an input element, and bubble should iterate through the text and save each link as a different thing or a different element of a list.

How can i do something like this?

one option is:

  • create a backend workflow that accepts a text as input and add an action to create the thing you need in the database
  • on your frontend in a workflow schedule the backend workflow on a list, as a list use the input value split by (press enter inside the setting of the operation to add a newline)

more info:
https://manual.bubble.io/core-resources/actions/custom#schedule-api-workflow-on-a-list

Operators & Comparisons - Bubble Docs

If you’re storing the links in your database as a list of texts, a solution could be to use a multiline input field, as well as the ‘split by’ operator when you save save the value of the input field to your database.

For the ‘split by’ operator, just add a space and it will save each new line as a separate entry.

Hope this helps.

3 Likes

You can also add :extractbyRegex actions after :splitby actions to meet the requirement if not fulfilling by splitting only.