I’m having trouble updating a collection with a simple/custom form which has a property with a multi-select option (with a many to many relationship to the actual collection).
The form updates the properties with a one-to-one relationship but doesnt show the properties which have many-to-many relationship, thus rendering me unable to update the collection. I also tried making a custom form with multiselect drop down, but this also doesnt work.
Hope this makes sense, if not here’s a more detailed description: Im trying to make a app for a Animal Shelter, where they can upload animals (ie the collection is Animals). Several properties need to be updated (Species, Size and Sex; all one to one relationships) but the “colour” property would need to be a many to many relationship since a animal can be more than one colour, and a colour can belong to more than one animal). Anyway, when I create/update the Animal collection, only properties with one to one relationship update - whereas it isn’t possible with the many to many relationship properties (ie Colour).
Hey, yes simple forms in Adalo do not work with Many to Many relationships.
You need to approach this slightly differently, as you can’t apply a many to many selection until the (dog in your example) already exists in the database.
So I would suggest do a multi step form… but when you want to apply a many to many relationship to the dog (colour in your case) make sure you are passing the current Dog Data through at least one screen. Next, create a custom list for (Colours), Add an Action to the colour list > Update Current Dog > Update dog colour Propery > Add Current Colour (the colour selected in the custom lis). This will now apply the colour to the Dog.
You can then set some visibility conditions, for example have two Icons (Unchecked Icon & Checked Icon) - Visible if Current dog contains current colour and vice versa. To remove you can then simply Update Current Dog > Remove Current Colour (with a button in the colour list such as the check & uncheck icons stacked).
There are other ways to do the above, but if this is the first time you are using Many to Many relationships I’d go with something like the above.
How do I do the reverse? Ie Your recommendation allowed me to update a collection where some properties had multiple options (many-to-many relationship with the collection), but how could we search/filter the collection with the various properties?
ie Using the above logic, the shelter can create and update the Animal Collection. But can we do the reverse, in which a pet owner searches the existing Animal Collection for their pet using the same properties?
I tried using the same methodology, but my custom filter doesn’t seem to pick up the properties with a many-to-many relationship (ie Colour, Breed).