I’m using the following formula to split the list in to individual options (split by(,)) which is working great.
However, when I use :unique elements to remove the duplicate options - only the first “works well with others” option is removed while the other duplicates are not.
Can someone point out where I’m going wrong? If one option is being removed correctly then I know I’m on the right track but the removing the other duplicates is proving difficult.
I’ll be honest though, it seems like a weird data structure to be joining list of texts in your database, then splitting them again for this dropdown…
EDIT: nvm I think my suggestion won’t work, I thought this was a list of texts you are storing, that would work. But seems like you have a single text field manually joining them together with ", "?
@tylerboodman Yeah exactly that. Hence why I tried to split the list first and then add :unique elements.
I thought it might have been a weird data structure and the more I think about, the more I’m going to need to break the keywords/descriptions in to it’s own thing in the DB and then reference from there. Thanks for the help!
Yea see if you can restructure, you could do a List of texts instead, but they will be just stored as text.
Seems like you want another datatype with a text field, then make one item per “phrase”. Then your current datatype just needs to store a list of the new datatype. Then your dropdown just searches for your new datatype
@tylerboodman - yep, definitely seems the way to go. I guess that’s what happens when I try to find the lazy solution instead of the right one. I’ll restructure! Thanks again
@tylerboodman - Sorry me again, when you say “then make one item per phrase” how would I go about that? At the moment it’s still saving all the options I type in the multi-select dropdown as a single list where I want to do what you suggest and add one item per phrase.
So you can either manually make these in the “App data” tab just making a new database entry per phrase you have. Or if this is something end users would be adding then you need some kind of front end UI to create new database entries (easy to do)
Then your dropdown just needs to Do a search for [your new data type] and the option’s display would be Current option's [your text field which would be the phrase]
Then your current datatype just needs to store a list of your new datatype.
So I’m picturing a central database of different phrases like “Works well with other” and “1st in cross country” One database entry per phrase. Then users pick from that existing list of phrases to save multiple onto a particular student.
How are those phrases being typed in the first place if they are just picking from a multi-dropdown? Is this something set up by you first and users just pick the ones in your database? Or do they also type in ones that don’t exist?
Let me know if I’m on the wrong path… maybe I’m not following the flow
From your screenshot I can’t tell exactly what’s wrong here. If you “Keyword” field is a List of things, then it will show each thing’s primary field separated by , so it may appear as a single string of text (if that’s how you have it set up, normally it shows a list of unique IDs unless you changed the primary field)
Or perhaps a searchbox to find existing ones matching their search, and create a new item if it doesn’t exist? So it’s there for the next person to pick? (Good luck with filtering profanity, etc though)
Yes, you’ve got it correct. They can select from the multi-select or if they want to create a new item then they can simply type that in and that will create another entry.
How I would want it to show up would be to have each keyword as a new line in the database with its own unique ID and a relationship to a particular student.
Currently it’s just showing a list of texts on one row which I don’t want as that’s similar to what I had before.
Perhaps I’m making a mistake when I create the entry in the workflow. What I’m currently doing is -
Okay in this case you want to create multiple Keywords, each with their own Keyword (a single one) and a Student (User)
Right now you have one Keywords with a list of Keywords (List of Keyword) and a Student (User).
Bubble is a little weird with creating a list of things.
Option #1: use a backend recursive or “Schedule on a list” workflow #2 Use a plugin (most likely ListShifter or Floppy) to iterate on each Keyword (Making a Keywords for each Keyword selected) #3 Use the built-in Bulk Data API to create it all at once… I like this method because you send an API call to your own app and it creates it all quickly. Takes some setup though with the API connector
Any particular reason you just don’t want to store a List of Keywords on the Student directly? Then you can set the Student’s Keywords to the Multidropdown’s value and be done. You can still display then on their own line in your front end using a repeating group.
But I can see your way scaling better if there are a lot of keywords for one Student.
Your datatypes would be (going your route of One keyword per database item):
Student
Name (text)
etc…
Keyword
Name (text)
Keywords (probably rename this one)
Keyword (Keyword)
Student (User)
I was suggesting (assuming these lists of keywords aren’t huge)
Student