Pre-populating relation fields in a new record... two levels deep

Hi everyone :slight_smile: h

Hoping you can help educate and guide me to achieve the following:

I have 3 collections: ‘Properties’, ‘Rooms’, ‘Items’.

When a user creates a ‘Property’, I would like that new ‘Property’ to have specific default ‘Rooms’ and a user can add more custom ‘Rooms’ if they want.

When the new ‘Property’ with its default ‘Rooms’ is created, I would also like each default ‘Room’ to have specific default ‘Items’ in them.

Is this possible?

I tried using a lot of the different relationship options and the automatic population but hit a bit of a wall. Any knowledge out there on how to achieve this? :slight_smile:

Thanks! Adam :v:

Hi Adam,

If there is one default room for one property and one default item for one property with the room then you can make the button as a list and filter it for the default one and set the maximum records section to 1.

If there is three,four default rooms for one property and three,four default items for one property with the room then you need a countdown with a list to add them all for the record :slightly_smiling_face:

Three videos for Bulk update records made by Victor! : Adalo hints: how to "mass update" records in the collection with the help of countdown timer - YouTube , Adalo hints: mass delete with sub-collections (countdown timer tricks, part 2) - YouTube , Adalo hints: simple mass delete (countdown timer tricks, part 1) - YouTube

Another video for Bulk update records made by Flawless! : How To Add A Collection of Items To Another Collection of Items Within Adalo - YouTube

Another three videos for Bulk update records made by Paolo! : [ADALO TRICK] Easy - Bulk update records - YouTube , [ADALO TUTORIAL] ... Continuation: How to bulk update relations - YouTube , [ADALO TRICK] Intermediate: Bulk update relations - YouTube

Thank you

2 Likes

Wow wow wow. So helpful these videos thank you so much!! Using countdowns is very clever and a solution I would have never found! Thank you so much.

So I got it to work for adding the Rooms to a New House but struggled a little bit with adding the Viewing Items to the Rooms within the House…

I tried adding another custom list to the same page but that didn’t work. Maybe my data structure is wrong? Do I need to go to another setup page for that?

Any guidance on how I should approach that?

Cool!

Is it possible to add a video showing the current setup and what you need to do? :upside_down_face:

Sure, I just created a video that hopefully describes it - Loom | Free Screen & Video Recording Software

Thanks again for the help and let me know if I can clarify anything :slight_smile:

1 Like

Thanks for the video! Checking it now!

Hi Adam,

Sorry for the late reply!

OK so what you need is to show the viewing items for that clicked room in the property!

What you need to do is add some viewing items in the viewing items collection and select the default rooms! Something like this :

image

image

So create viewing items for the default rooms!

Then after adding the default rooms for that created property from the list with the countdown you can add a list on the Rooms List screen and connect that to the Viewing Items collection and make the filter from All Viewing Items to Current Room > Viewing Items!

And also I see that you have a Many to One relationship property between the Properties collection and the Rooms collection! I believe the relationship you need is the Many to Many relationship property!

And in the countdown that is inside the list for adding the default rooms for the created property add another action to update room for add that proeprty. So you woud have two Update actions!

  1. Update Property - Add Room for the Rooms relationship property ( Many to Many )

image

  1. Update Room - Add Property for the Properties relationship property ( Many to Many )

image


image

Thank you

Wow Dilon, this is amazing and so clear! Thank you so much. I had a suspicion the data structure I had wasn’t quite right!

I’ve set everything up as you outlined but I keep getting an “Action cannot be completed” message. I tried setting the countdown timer to longer but that didn’t seem to work either :thinking: Am I missing something?

Again thank you for your time so far, I’m new to the platform and trying to figure it all out :sweat_smile:

Cheers!Adam

Your Welcome!

Is it possible to add a video of that too? The Setup and Preview?

Thank you

Hmm I think it’s working now. I think it may have been that I hadn’t refreshed the page for a while or something :slight_smile:

So so happy to have this progress!! You’re for sure my hero of the month, thanks again.

1 Like

Hi @dilon_perera,
I have a client who wants to allow his customers to either create brand new restaurant orders OR create a re-order – that is, create a new order based on the items and quantities of a previous order. Similar to how Skip the Dishes offers the option for users to view past order history and click on the Re-order button. How do I do this so that the client clicks on a Re-Order button once and all the items and quantities from the old order are copied into the new order. Many thanks in advance. Mary

Hey @dilon_perera, I managed to finally figure this out. I had the wrong relationship between new order orderitems and old order orderitems. thanks, Mary

1 Like