i have a profile collection. the profile collection is one to many to user collection and skills. it has many to many relationship with instruments, and genres. i basically want to present a form to the user that does what adalo’s database view/update does but can’t seem to make it happen. user should be able to select one or more instruments, one or more genres and one skill level…ignore the few deprecated fields at the bottom of the form. would appreciate some help on this
I know this pain, struggled with it as well in the beginning.
With many to many relationships, you can only store those if you update a record.
- Have you tried the free component multi-select dropdown list?
- If you’re willing to store the values in Booleans, it becomes way easier!
Create buttons
- Front-end wise; In the button you can create an additional state ‘Click’ on whether the user selected the button or not. You can easily change the colors and add a checkmark icon for instance to visualize signal to your users they selected it.
Back-end wise
- Create the user before they go to the next screen
- When the user selects a button, create an action ‘Update user’ with that instrument or genre (set value to True). When deselected, remove it again (Update user > Instrument to False).
Hope this helps!
Thank you @Judith
i haven’t tried the free component for multi-select dropdown list -is that in the marketplace?
i’m not quite understanding the usage of the booleans. however, i do understand that i need to create the record in order to update it was relationships. i think you’re suggesting that i update the record when ever the user makes a selection (as opposed to requiring them to hit an update button/action at the end?).
i’m gonna try creating the musician profile before transfering to the musician profile screen and then updating from there. thanks again
what i was thinking i can create a sparsely populated musician profile for the user when the user is created. then, when the user clicks on a menu to update musician profile, system presents the Update Musician Profile screen. is there a way for me to read in the musician profile for the current user, just to have a ‘Current Musician Profile’ to work with (read it into memory as it were)?
Note: each user has at least one profile and early on i can live with limiting a user to one profile. maybe i should just make the user <->musician profile one to one in the MVP and simplify my life
OK. implemented a work around and now have the Musician profile i want and can update it. still stuck on enabling the user to update their Instruments (a collection many 2 many with Musician Profile) and update their Genres (likewise many to many with Musician Profile).
a component list this from adalo view/edit record would solve my problem
Such a UI component doesn’t exist on the front-end indeed.
Yes multi select list is in the marketplace as a free component.
For the buttons and additional states, there’s more info here: Buttons | Adalo Resources
For working with booleans; each genre and instruments needs to be a property in your database as a True/False type (aka boolean). On click of the button the value is set to true.
You then create another state of the button that only shows (visibility rules) when the value of that property is true
. When clicking that state of the button the action is set to false
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.