Adalo doesn’t let you clear a one-to-many relationship by default.
I have a work-around for it but it does add a couple of actions.
Here’s what you are trying to do:
“Update current student > Remove current class”
(but this is not an option).
Here’s what you can do:
“Create New Class > Update Student (Add New Class) > Delete New Class”
This will create a new blank class, add the student to the class, then delete the class, thus clearing the field.
Hi Flawless, good to know that I am not doing anything wrong, but what a pity that it must be this complicated.
I think your idea also doesn’t work for me completely. A class can already have other students, so I cannot create a new class and then only add the current student.
With an n-n relation I can add and remove the class from the student. The only risk here is that you can add multiple classes to one student, which shouldn’t be the case.
Yes, but I don’t see them anymore in your example right? If you uncheck them, they’re gone. Or do I understand your suggestion not completely (there is no sound with your movie right)?
@rozza, I really like your solution. That looks pretty clean. But for some reason I cannot get it working.
I don’t get an error message or so, the checkbox is simply not unchecked when clicking it.
Sorry it seems like only M:M will take this. My presumption was that you could apply it in the same manner. Sorry for sending you the wrong way.
Why not have an M:M relationship though? Even if you don’t need it right now in the future you may have a need. You can limit students to only 1 class in other ways. Then you can add / remove them to the ‘one’ class easily without API calls and extra actions in Adalo.
Hi @Rozza, thanks again for your reply. The thing is that in that case you could go to class 1 and add the user and go to class 2 afterwards and add the user as well there. But there I can maybe use the M:M API call suggestion you mentioned earlier to empty the class for this student before adding him/her.