Save list output to another collections record


Has anyone found out how to save the output from a list, into another collection?
Maybe even into a single record?

Could you offer more context of what you need to achieve, maybe a scenario?


I have a list of order items (several properties in 1 record) in a Cart-collection.
Now I want to save that list into another collection for order history, as one single property in a record.
multiple properties are also ok.

Ok. Why don’t you just add different true/false and date fields that you can use to filter a separate list which you could call ‘order history’ but is actually just a list of orders?.

I have a food delivery app and that is the way I do it.

So in my order collection, a couple of fields I have are ‘order submitted’ (true/false field), ‘order submitted date’ (date field), ‘order delivered’ (true/false field), ‘delivered date’ (date field), ‘order accepted’ (true/false field), ‘accepted date’ (date field), ‘order declined’ (true/false field) etc etc.

Using these fields I can then make any list just by filtering with the above fields. So for example. I have an order history page which shows a list of orders and is filtered by ‘order accepted’ = true, ‘order delivered’=true. I can manipulate that even further by adding date pickers so that a user can choose the day that they want to search for orders.

If you create a separate list as you mentioned, any changes to an order would need to be changed in two different places.

Keeping it as one order list is much simpler, just work on learning the ways to filter lists correctly and you will achieve what you need.

You can of course do it the way you mentioned but I would class that as a duplication of data. Not only is that not really the best way to do things but will also affect your storage as you are doubling the amount of records you are storing.

Let me know if you need anymore advice.


1 Like

So much better, thanks!

1 Like

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