List.additemtofront NULL


Hi! I can’t seem to find out what seems to be the problem here with List.AddItemToFront, it just shows up as null every time…

@Mayonnaise ,

Lunchbox is not anymore under maintance. Could be cause trouble…

KR

Andreas

Your dictionary doesn’t seem to be returning anything. You’ll have to inspect the contents of the custom node and see if you can fix the issue or rewrite the logic in your main graph (which can be done with a little math and some list manipulation).

Hi @Mayonnaise ,

Adding to Draxl & Nick, the LunchBox node doesn’t seem to work. You could use the following DesignScript code as replacement:

Math.Sum(List.TakeItems(numbers, 1..List.Count(numbers)));

PS: The above code only works with a single list as input, the below also works with a list containing sublists, which might occur.

Math.Sum(List.TakeItems(numbers@L2<1>, (1..List.Count(numbers@@L2<1>))@L2<1>));

3 Likes

Thank you so much @Daan! :star_struck: