Adding a Custom Filtered List To Save

Hi guys, I’ve made a custom list of selected items of equipment. Then I want the list to save to my Event Equipment database with the quantity selected.

The idea is that a user can create a new event with required equipment which is linked to current stock. Lets say 3 mirophones are selected I want that to deducted from the total stock. And I want users to see a kit list on the newly create event.

I’m getting confused on how to do this with the save button for each bit of equipment.

Any guidance would be great.

Regards,

Will

Hi Will @W_H,

Welcome to the forum!

That’s an interesting question. You can achieve this by creating a relationship between Equipments and Events (many to one). So when a user adds Equipment to the Event, you set the relationship in the Equipment list.

You will also need to “release” the Equipment entry. Unfortunately there is no way to “remove” relationship in Adalo, so one of the ways is to create an additional property in Users collection - it will be a relationship to Event; call it EMPTYEVENT and always keep it empty. Then upon release you can update current Equipment record, set relationship to Event to Logged-in User → EMPTYEVENT. With this you’ll remove the relationship to the previous event.

Allowing user to see list of Events, then see Current Event and then see list of Equipments filtered by Current Event is trivial.

However, the answer above does not solve bigger problem. Most probably you will not want to “block” equipment forever after adding it to the Event. So you will need something like a “schedule” for each equipment piece, when this piece is available for booking and when it is reserved. For this purpose you may need to use an additional “Bookings” collection, and then filter out Equipment list based on bookings. Filters will depend on booking precision (day-based is one approach, hour based is another approach).

Best,
Victor.

Hi Victor @Victor,

Thanks for the welcome.
It seems I have a relationship with my Events and Equipment, but on the save button I can’t see the updated filtered list on the right? I’m very confused in how to make a list of equipment used with the quantity used. It seems like nothing shows up.