Hi - For some reason I cannot figure out how to create a new thing and then add this new item to an existing list at a certain spot.
E.g.
I create a new thing called “Car” TOYOTA
I add it a list of Cars on a User thing, however i want to insert this new car as the 3rd item in the list of this user’s cars. In this example the user already has 5 cars in their list, TOYOTA would be added after SATURN:
FORD
SATURN
HONDA
NISSAN
GM
What is the easiest way to do this?
I have the following work around but not sure if there is a better way to do this:
Remove List after SATURN remove list of Users Cars:items from # 3 (HONDA, NISSAN, GM)
Add new car to list (TOYOTA)
Add removed list back (HONDA, NISSAN, GM)
Ideally looking for one step that would be something like: add item after #2
Add a new datafield type order number
Each car gets such a number by making the number current users list of cars: count + 1 for example.
Order the list of cars by number.
Now when you add a Toyota and want to make it item nr. 3
Make changes to a list of things: All cars with a higher order nr than 3. Add 1 to their number.
Make Toyota nr. 3.
You may have the issue that different users all use the same cars?
Then you need a new datatype called e.g. list item that each has a field: car and an order number. Whenever a car is added to a user, a list item is created for just that user.
@TipLister - Thanks for the suggestion - I did see a lot of posts on the forum talking about adding a order number or position number - I did try these but it becomes difficult to manage and track - especially if people are deleting items or moving items up and down in their list.
My goal is to keep the list of things simple.
The example above was generic - in the real world every user would have a unique item (car) in their list so different users do no use the same car. Perhaps I should have said CAR-LICENSE-PLATE
Seems like there should be an easier way, maybe I’m missing something.
Not sure if this helps you, but couldn’t you use Keith’s lift shifter to change the custom order in which your list is displayed, instead of trying to “store” any kind of order structure in the bubble database itself?