Adalo does not implement many to many relationships properly... with evidence

I am using the standard Adalo DB and have a many to many relationship between 2 collections “Products” and “Business Requirements”. I have an ‘Add Business Requirement’ screen and form that the current Product is passed into. When the relationship is one to many, the Current Product is available to be automatically set on the Business Requirement…

… BUT… When the relationship is many to many, the Current Product is NOT available to be automatically set on the Business Requirement…

… if I am still passing in the Current Product to the ‘Add Business Requirement’ screen/form it should still be available?

Hi @HughG,

Did you try to add Current Product as a 2nd action?

Best,
Victor.

1 Like

ok… so I seem to have have stumbled on the solution, but I don’t think the the following information below is in the docs nor is it in any of the videos.

I think Adalo has neglected both it’s Youtube videos and documentation doing just the minimal amount on these two things. I shouldn’t be ‘stumbling’ on a solution for something as fundamental as a many to many relationship implementation in Adalo Forms/Screens… there should be a video for it at least… might be a good video for the “2 minute” playlist?..

To implement a many to many relationship in the Adalo screens/forms (when adding/creating a Collection item) you first add the ‘create’ action and then Adalo provides a ‘New’ object for the created Collection Item that can be added to the Current Collection item on the other side of the many to many relationship…

image

image

Thanks. I added the second action to update the New Bus Req on the Current Product and the Adalo DB is updated correctly but now my list of Bus Req’s for the Current Product is not displaying the newly added Bus Req’s?

Hi @HughG,

It’s difficult to say what’s happening remotely, without checking the app.
First of all, you need to see if the relationship is added or not (check the database, both records in both collections).
If the relationship exists in the database but it’s not displayed, then the error is somewhere in the app. By the way, if you use action “link back” after creating the record, the data on the previous screen may not be refreshed.
If relationship doesn’t exist, then Adalo doesn’t add it for some reason. You can try to add the relationship from another end (Update New Business Requirement - add Current Product) - I think it’s possible.

Best,
Victor.

1 Like

no no … it’s fine… I just had to edit the style on the list. It didn’t have the height to show the new bus req’s (although there should be a scroll bar or load more CTA on the list object to show that there were more records in the list.)

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.