Combine List, with given value to true value

Hello all,

I’m trying to combine the List.Filterbyboolmask (inlist) with the list.clean (true value) (See picture). I want to return multiple of the same value from the first list, only if the list with true has multiple true values. So in my final result i should have 3x B-RO-KLWATER_SLAGVAST PVC_160 in list 0, list 1 should have 1x B-RO-KLWATER_SLAGVAST PVC_16, list 2 should have 1x B-RO-KL-WATER_POLYETHYLEEN PE, etc.

Remove the List Create and the List.Combine nodes. Use List.CountTrue to count the number of true occurrences from the List.Clean. Then use List.Cycle to list out each item from the bool mask by the number of occurrences returned by the List.CountTrue node. You will probably need to set the lacing to longest on both of these nodes.

Also, clean up your list structure. Those extra list levels aren’t helping anything.

1 Like

Place_CogoPoints_02.dyn (95.8 KB)
Hey Staylor, Thanks for the response! I’m new to these list create stuff, but with the listcount and the cycle it gives me a list of all the names in the first list times the true value(4x). I want a list like this:

list
0 list
B-RO-KLWATER_SLAGVAST PVC_160_WATERBEDRIJF GRONINGEN-G
B-RO-KLWATER_SLAGVAST PVC_160_WATERBEDRIJF GRONINGEN-G
B-RO-KLWATER_SLAGVAST PVC_160_WATERBEDRIJF GRONINGEN-G
1 list
B-RO-KLWATER_SLAGVAST PVC_160_WATERBEDRIJF GRONINGEN-G
2 list
B-RO-KLWATER_POLYVINYLCHORIDE PVC_160_WATERBEDRIJF GRONINGEN-G

Set the lacing to longest on both nodes.