Toggle Help - toggle>favorite restaurants, toggle>favorite restaurant>menu items

Hello! New to Adalo and the community, I have found a lot of resources that have helped me build out an app that I’m pretty happy with despite this one issue. I have a favorites list connected to a “favorite restaurant” toggle on the current restaurant page, but I want that list to filter down into favorited menu items within that favorited restaurant selection.

I have individual menu items on the restaurant page, to which you can click into and go to a nutritional and review panel for that item (Ingredients, allergens, reviews, etc.) On this nutritional info page with the menu item that is selected, there is a separate “favorite menu items” toggle. Each menu item has a “Favorite menu item” toggle.

The favorite restaurants list is working correctly, however the favorited menu items within that restaurant are showing “all favorited menu items” and not the favorited menu items within that specific favorited restaurant.

I have two “many to many” relationships set up for this feature in the database between Users>restaurants and Users>menu items. I’m reluctant to mess up the whole app for a small fix, but I suppose it could be something wrong with the User>menu items relationship and not being “many to many”? Newbie here, but I appreciate the help. Thanks in advance!

Hi @CM11 ,

You can create additional collection that is a combination between restaurant and favorite menu and this can have 2 1-to-M relationships to restaurant and menu.

If you are worried about changing it in your current app, you can always have the option to copy to another app or clone your own app.

Hi @CM11,

Just adding some information besides for the great information provided by Yongki!

I guess you didn’t filtered the list with the restaurant and only filtered for logged in user’s > menu items.

Check this video : Favorite Items and Restuarants.mp4 - Google Drive

Thank you

Thank you both @Yongki @dilon_perera for the help!! Although very difficult to hear what you were saying @dilon_perera, the video was very helpful and helped me finally fix the issue. I’m also trying to build a partnering back end app to this client facing app, where restaurant owners can add their own info on their own (restaurant name, picture, menu items, nutritional info, etc.) and have it update the database of the client facing app. Are there any resources you guys can point me towards that would elaborate on sharing/updating databases between multiple apps?

1 Like

I’m really sorry for that, Connor! Will try to fix it on future videos! Thanks!

Awesome!

Like two apps and one for restaurants and this one for users? You can create the app for restaurants with sharing the same database of the app that you created for users! Check this out : How to Share a Database Between Apps - Adalo Resources

Or you can display a button for the restaurant owner on the restaurant details screen! I believe you have a One to Many rel created on the restaurants collection to store the user and then you can add the visibility condition based on that property like Current Restaurant > Creator’s ( One to Many rel ) > email > is equal to > Logged in user’s email!

Hey @dilon_perera thanks for the reply. I actually created a new topic about this. I would like a separate web based app for restaurant owners and started building it with the shared database but it’s getting a bit messy. I’m not sure if I need to set up a new collection or add new relationships, but I want the owners to be able to create their own user/owner profiles on the web based app and add their restaurant and update their menu items and nutritional info whenever they’d like. Any additional help on the best way to set this up would be appreciated!