Hi! I have searched throughout the forum, but still haven’t managed to find the solution. The question is simple, but I don’t know if the answer also is…
I have managed to duplicate a list of things (illustrated in the pic below) with the parameter I want (car), but I can’t seem to figure out how to add +1 to the ID-number in the new table… I have a column in another table that counts number of cars which I use as a reference point but…
What is the problem? Your ID numbers on the new table are in order right? Going from 1 to 2 ( ie 1+1 )…don’t you already have the serial numbers getting added correctly?
Or after re-reading your post are you trying to get the ID of Car Opel to be 2 in the new table, and so Ford would be 3 and Rolls Royce 4 and BMW 5 and Mazda 6?
I am a bit confused about your goal and what you are having difficulties with because I am not sure why you would want to duplicate a list of cars and change the ID…your ID of Opel ( a Make of a car ) should always be 1 to represent that Make of a car…then you can have relationships to another data type of Model ( which for BMW would be M3 or 7series…sorry I don’t know the models of the other car Makes…just how I roll )
Then you could have an ID for each Model as well…but really you shouldn’t use numbers you should use random generated strings or use a SKU and Key system.
Keys are short sets of letters to represent a product like R for Red or LRG for Large…whatever you want them to be.
SKUs are strings created by a set of keys getting added together like R-LRG…for Red Large
In car example could be BMW-7S for BMW 7 Series.
These can be very beneficial for far reasons.
However, if you are trying to change Opel from table 1 with ID of 2 for the duplicated list…you need to do a math formula on the ID ( make sure it is a number data field ) and reference the ID and add 1
ID = Original List ID+1
Can use the list element as a source: Repeating group 1 list of cars
Thanks for your reply, boston85719! I think I explained myself a little bit short earlier… The illustrating table in my initial post is the correct outcome of my new table. I manage to iterate through the original table and duplicate the cars, but I have difficulties with adding any “new” or variating info in each duplicate (only copied info from the origianl is correct).
I tried to set the ID like this to get the next “serial number” correct:
ID = Current user’s Company’s number_of_cars + 1
The problem is, that is doesn’t add +1 per duplicated car, so ALL of the cars in the new table get ID = 6.
If you show screen shots of how you are making the copy or open your editor so I could look at it and see how you are doing things I might be able to help you figure out what is the issue.
Sure! This is how I “wish” the workflow would generate the duplicate from the original object, but ends up with just adding one number for all objects…
The result is a list of things, but each object which I’m duplicating is a single thing I think this is the correct approach, but as mentiond… I’m struggling to add a new and increasing value in on of the columns… It seems that I only can add already existing values…
@endrefyl, what’s happening with doing this workflow on a list is that Bubble is counting the number of cars only once before performing the workflow and then passing a static number to every item in the list (which is of course 6).
There are several ways to do this. Try searching ‘recursive workflows’ in the forum here. Recursive workflows are your friend
If it’s easier or you simply want to use the workflow on a list, simply count the items in the list you are running the workflow on and then pass the ID as ID = This car’s ID + this lists:count.