Split text from input via comma and create new thing on each string

Hello!

Is there a way to split text via comma from input and each split string can create a new thing?

I have a car database which has name field. I have an input box in which you can paste a series of data with comma separator. Clicking a save button will create a new thing in database on each car name.

Thank you. hoping someone can help me.

1 Like

Hi there,
To get a list of texts split by comma form an input you can use the operator :split by when saving the value of the input.
Alternatively ou can use the multi dropdown input.

3 Likes

The Bubbly way to do this is to simply create the items one by one. That is, don’t ask the user for a comma separated list of names, just have them enter them one by one and create each one on input.

Vanilla Bubble doesn’t really support the interface you’re trying to create. (Your proposed interface, BTW, is neither arguably nor obviously better than “the Bubble way”.)

But, if you have a comma-space separated text value, you can do the text operator :split by… on it (where the separator is comma-space) and that will yield a list of texts. Then you have the problem of iterating over that list of texts to create objects (Things).

You can do it, but it’s more effort at the moment than most are willing to put in. (And again it’s not necessarily better than easier options in Bubble.)

For an explication of how these two methods differ, and how you might do things your way, see: đź“’ What is the best way to publish a list of objects to bubble? - #10 by keith

1 Like

right now the workflows is user needs to click save button again and again. feedbacks was its so time-consuming. So I wonder if its possible. I found a solution where I need to use a loop(plug-in). I don’t know if this is a good solution. but still thank you for your advice.

Try to split the string by comma (as already suggested) and use the Loop tool called “For each”, present in the “Ultimate tool box” plugin, to save your list items in your database! :+1:

3 Likes

thank you for the advice. I will look for that loop tool.

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