Any guidance on how to use Multiselect Dropdown?

There is no documentation for this component anywhere that I can find, but it seems I can’t figure out how to use it. I did search the forum prior to this post and all I found was other users also confused about how to use this multiselect dropdown without any real solutions. For a creator claiming to be highly experienced and billing out $125/hour on their upwork profile, you’d think they’d be able to make a bit of documentation :smiley: :wink:

I want to make a “Create User” form. My users collection is linked to a Roles collection in a multi-to-multi relationship, as users and roles can both have multiple roles / users.

When I try to set the “Create” button to create a user, I am unable to set any roles upon creation. (This behaviour is actually the same when creating a user manually in the Collection itself. The “Roles” linked collection appears when creating, but selecting a role doesn’t add it to the roles list. I have to go back to the record after creating it to update / select the roles I want.)

If I then go back to that same Create button and add another action, this time to Update the “New User” record it would have just created in the previous action, I then see the Roles field.

Since this field is expecting a list because it’s a multi-to-multi relationship, I thought I would just be able to set the multiselect dropdown to update the roles field, because I expected the multiselect box to be a list…but this does not work at all. This seems like it would be the perfect use case, but here I am 2 hours later like “WHY doesn’t this just work!?”

I understand that the Roles field is expecting a list. The “Every time an item is selected” action of the multiselect doesn’t seem to actually create a list at all. I’m not able to use it to update the New User’s Roles.

How do I get it to submit the roles I select in the multiselect dropdown into the Roles of my newly created User? Or myabe the better question is how do I create a LIST of ROLES to submit to update my NEW USER with the MULTISELECT dropdown, or any other means?? Here’s a bit of bad Paint art.

Thanks a lot!

Hi @naossoan , I used the multiselect dropdown in an app I created two days ago, and I couldn’t get it to work for a record that hadn’t been created yet. Meaning if I put the MS Dropdown on the same form I’m using to create a record it, doesn’t work and I think its because the “Everytime an item is …” wants to populate the db field immediately. That’s how it’s made to work.

So what I did was submit the first form that creates the record without an input for the field that requires the MS Dropdown, then direct the user to a new screen (could be a modal) that contains only the MS Dropdown and then update the required field with the selections.

This is working on my app

Hope this helps.

Ok, I will try that, thank you. It’s odd how some things do not work as you would expect.

I’m working on two big apps at the moment. My friend needs an app to manage some basic things in his company so I’m working on that (The issue of this post) alongside my own big project.

It seems a lot of things don’t seem to work as you might expect unless you first send them to a new screen which can be frustrating.

I completely rebuilt the collections of a different, main app I’m working on because I think I had a lot of problems with it.

I still run into weird things. I have a bookings page where users request a booking, which creates a Booking in a collection. In the collection I have linked fields, one of them being to another collection of Status’s in a 1 to many relationship, that a booking can only be 1 status.

When I create the booking, I want to set the status of the booking to Pending behind the scenes (I don’t want the user to initially set it manually).

When I set up the button to create the booking, I’m not able to set the status of the booking.

Even when I do a subsequent “Update” of the “New Booking” within the same button (underneath the initial “create” action) which seems to work for some things, I’m still not able to set the status.

Since I don’t want to have the user set that field themselves initially, I just used a true/false within the bookings collection itself called “isPending” along with 2 others “isApproved” and “isComplete.”

Adalo really doesn’t play nice with its own collections sometimes. If I wanted the user who is receiving the booking request to set the status manually I would just have a way for them to do that in their dashboard. I really would rather have a separate collection of Status’s but it doesn’t seem to fit with my use case.

I really like this app. Glad to see they are still actively improving it.

1 Like

Hey again,

Do you know how I would go about automatically adding an option from this list to the user?

Basically, on one of the other screens I have a list of Users. I want to be able to filter the list of users by their Role, however, the problem with that is unless I also have a Role containing ALL the users, there’s no way for the list to show all the users, since it’s filtering explicitly by their role.

So, in order for the list to be able to show ALL users, there has to be a Role containing all users, called All Users, or whatever I want to call it.

But I don’t want the Admin to have to add that role to the user manually every time a user is created, since they are likely to miss it / not click it, then they will be wondering why the user they just created isn’t showing up in the list of Users.

The only way I have found to be able to do this is to create another dropdown list of all the Roles, filter it to only contain the All Users role, set the default value of the dropdown to be the current Role, which would be All Users because that’s all it will be showing, then set the Submit button to update the role of the user with the role of the dropdown box.

This does work, but it seems very…round-about and annoying.

The other problem is the new users will not show up in the list of users even though the roles are set properly on them.

Any ideas?

The solution I have seen for filtering lists this way is to create a field in the Users table containing a list of search items, so Role could be one of these items. You can then create a field above the list where users can insert or select the role (or other filter index) the want to filter the list with. I’ll try to find the tutorial that explains this and send you a link.

Meanwhile try this idea also from Victor Kuzmichev, quite similar to what I’m talking about:

You might also be able to get some knowledge from:

Ah yes I have seen these I am just not a huge fan of these methods either. Until Adalo adds more functionality I guess that’s what I have to do, though.

Something else is there is kind of weird behavior surrounding collection relationships.

So, for example, I am trying to have a 1 to Many relationship between a User and a Job.

A job can have multiple users, but a user can only have 1 job - at least that’s how I am planning it.

For example, One one screen is a list of Jobs, click the job and it opens it up on a new screen. Then I have a list of Users. Using a multiselect I can set it so when the box is ticked, it updates the “Current User’s” (the user from the list) Assigned Job (the field I want to set) to the “Current Job” (which is the screen I am on)

But if I want to remove that User from the Job, say I reassign them to a different Job, or just want to remove them from that Job, I either have to go back one screen, select the Job I want which would also contain a list of Users, then add the user to that Job (subsequently removing it from the original one). However there’s no way to just “remove” the Job from the user. The value must be “reassigned” to something else, not simply removed.

I can’t set the action of “unticking” the box to set the User’s Assigned Job to “null,” or “None” manually. It must set a value from a “list” input somewhere. This seems extremely counterintuitive because the value of this field cannot be a list, it is a single entry…but must be taken from a list. Very weird.

This seems a bit broken, because when you have a one-to-many relationship, the value can only be changed on the side of the “one” so for example, I cannot remove the User from the Job. I must remove the Job from the User.

Yea, I think this issue is because Adalo provides different types of functionality based on the type of relationship you specify. With a many-to-many relationship, you get the ability to ADD or REMOVE within relationships. But this is absent with one-to-many relatioships.

So you might have to use a work around; set the relationship between users and jobs to be many-to-many. On your job details page (where the page has access to Current Job Data), your users list filters for users assigned to the current job, while the multiselect filters for users with no assignments. So as you select the users in the multiselect dropdown, they are assigned and added to the users list on the page. But you also add a button to the users list that updates the Jobs list by REMOVING the current user.

You may have also thought of this, and probably hate the roundabout way like we all do, but I guess for a budding no-code system, the fact that there is a roundabout way is a plus too. Otherwise we’d be stumped. We hope that Adalo would quickly address some of these issues, but until then we keep suggesting and voting for suggestions on the Feature/Component request portal.