I’m attempting to build a picker that looks like this. Any pointers as to how I’d go about it?
Hi there, @treb.gatte… what you are showing there should be pretty easy to build, but it kind of depends on where the data is coming from and what you want to do with it. I mean, we can probably assume the list on the left is coming from the database, right? If so, is it a search for things in a data type or is it a list of things in a field? For the list on the right, the main question (in my opinion, of course) is what are you adding the names to or removing them from? For example, it could be as easy as adding each name to a custom state (list), with a repeating group on the right displaying the custom state list and the repeating group on the left displaying the initial list minus the custom state list. But again, I think a piece of the puzzle that’s missing from your question is where the data is coming from and what you need to do with it as the user adds and removes names.
Anyway, just food for thought there, but if you can provide more info, I’m guessing someone will be able to suggest a pretty solid solution or two.
Best…
Mike
Basically, I’m building a team on the right. Once I click Save, the Team will be added to the Teams list on the user profile.
The list on the left is the list of users in the company. On page load, I’ll populate all users on the left where company = current user’s company. On the right, I’ll load whoever is already in the team.
Hopefully, that’s a bit clearer.
How I move between the lists isn’t clear to me, hence the question. My searching in the forum turned up nothing.
I’m thinking I could create an example for you, but I would need to know more about the Teams list you mentioned. Given the details you provided, it’s unclear to me if the Teams list on the user profile is a list of teams (meaning there is a Team
data type, and the field is a list that links to that data type) or if the field is just a list of users that you are calling a team. I’m thinking it’s the latter, but I’m not sure, hence the question. Oh, and obviously you would want the user to be able to select multiple names and add/remove them at the same time, right?
My questions aside (and maybe you don’t really need someone to create an example here), I’m thinking I would use custom states to do three things… 1) store a list of users that have been selected in the list on the left to be added to the list on the right when the add button is clicked, 2) store a list of users that have been selected in the list on the right to be removed from that list when the remove button is clicked, and 3) store the list of users that will be added to the team on the right when the save button is clicked.
The data source of the repeating group on the left would be the users in the current user’s company minus the list of users who are already on the team and also minus the list of users in the third custom state. The data source of the repeating group on the right would be the list of users who are already on the team plus the list of users in the third custom state. Then, when the save button is clicked, add the list of users in the third custom state to the list of existing users on the team.
Yea it’s doable no problem, also Bubble makes a drag &drop plugin if you want to be able to drag users into the team
Thank you, @mikeloc ! Yes, this is basically what I need.
Ok, I have some reading to do on how to do these actions as I know roughly what they are but not the specifics. This is extremely helpful.
Happy to help, @treb.gatte… if you need more of a deep dive into any particular part as you go, just give a shout.
This topic was automatically closed after 70 days. New replies are no longer allowed.