Replace items in sublist?


#1

I’m looking for a way to replace items in sublists. List.AddItemToEnd with Longest lacing works fine but I want to replace, not add. List.ReplaceItemAtIndex only seems to work on the top list.

 


#2

See if this helps…


#3

List.Combine might be another option:


#4

Dimitar, in your example, don’t we want the values of the lower right Watch to show 0,0 = a 0,1 = b 0, 2 = c ?

Think of replacing a column of values in a spreadsheet.


#5

You’ll need to be more specific. If you simply need to replace the head of the main list, you can try the following:


#6

Looking for a result in your sample, Dimitar, like in the image below. a b c should be the 0th place in the sublists. Cheers, DynamoSandbox_edit1


#7

DynamoSandbox_2016-01-20_10-07-18


#8

20160120-3


#9

It looked so easy…

ReplaceSubList


#10

l<2>, not 1<2>


#11

Arggh, didn’t us draughtsmen go through having characters not to use back in the 1980s or earlier?

I published a Node, anyway. Perhaps it will make the solution more searchable: “ReplaceSubList

Here are both ways…