"if" logic between lists is being truncated

I am trying to build a new list using a boolean condition to select the right sublist. It seems like it should be doable with a simple if statement, and I can get close using design scripts if logic, but it is truncating the values in the list.

I have tried using the if, list.map and list.combine nodes, but all of them pull the entire source list instead of the just the value at the same index in the source list. I have tried multiple versions of lists at level to try to get those to work.

Test image shown, goal is to be pulling data from dictionaries via following design script (TryGetValueAtKey is from archilab, but same error occurs when using the inbuilt GetValueAtKey)

(Dictionaries.TryGetValueAtKey(tests, key)?Dictionaries.TryGetValueAtKey(accent, key) : Dictionaries.TryGetValueAtKey(field, key));

Why is the list being truncated with the designscript if logic? How can I get the full sublist at the same index of the correct list based on logic?

Try adjusting the lacing - longest if memory serves.

Thanks! Longest lacing worked on the if node to get the desired result.

1 Like