Duplicate a list without including second list

Anyone knows how to duplicate a list without an included second list?

I’ll try to explain how I mean:

A user have a list of products. Each product has a list of something.

I would like to duplicate the list with products to another user without the list of something included for each of the products.
The second user creates the list with something as he uses the app.

What I’ve that I can’t get working is:

  1. Create a new list of products adding the old products using Add list
  2. Making changes to product list using Set list for the something lists

It seems to work, but when second user changes the products or somethings it is changed for first user.

Does this make any sense, anyone knows how to do?

I understand what you are trying to do, but honestly do understand why.

If you want to allow one user to create a list of products that has a list of something (like what? images or other related data types) and then have another user copy those things, they should in theory be wanting to copy the entire thing, not just one portion of it.

In your app database there will be an entry for a thing (a datatype) in your case a product. It will have data fields (maybe images, or a price). When you copy that thing, all of the data fields will be copied with it…Although you are not really copying the thing; instead you are simply allowing another user to access the same thing.

I assume your database structure has some kind of related data type as a field on the user data type…probably a list of products.

If you look at your database, you will see that when you perform the steps you outlined, the same number of products exist in your database, it is not doubled, and instead each of the users will have the same list of products on the user data type product list.

What is it that you really want the user to be able to do? I mean, what is the reason you want them to ‘copy’ a product but not all associated data fields.? Is there a specific data field you want copied and if so, what field is it.

If for example you only want the user to be able to copy the products name, that is simple enough. If you want them to copy all fields, but be able to change them without affecting the other products previously created, that too can be done.

What you should do on the product data type is set a related data field to be of type user.

So when a user creates a product, their account is related to it. Then when another user wants to ‘copy’ the products you should create a list of things (products) and set the fields equal to the values of the products being copied, but change the user field.

Hi boston85719!
Thank you for quick reply and good explanation :slight_smile:

The way I did it, it pointed at the same data (as you describe it) which could be one use case. This time it was different so created empty products and then Copied List (instead of Add List) which was my first problem. Then I used Clear List for the something lists to empty and it works as intended.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.