Looping a list with values of other list

Hi all,

I am new to Dynamo and glad I found this forum :wink:

I have a question about picture underneath here:
Eacht item in list RED=1 needs to be checked if its value is between the values of BLUE=2a and BLUE=2b.
If true, then corresponding value of MAGENTA=3 needs to be used.

So each item out of RED=1 needs to loop 5 times (List.Count) at most, but now it loops 3 times (number of items in RED=1).

I am sure it is something not to diffcult, but I can’t get it managed right now. So thats why I started the post here.

One more thing. When value is TRUE and MAGENTA=3 is used, then it could loop to the next RED=1. So it doen’t need to loop further till the 5 times (this because of the speed in bigger projects).

Iam curious on our answers.

Regards

I think this is easily solvable, but I’m not quite understanding your question.
Could you give a couple of examples of inputs you’d want to give and what kind of outputs you’d want because of those?

Inputs are the elevation values of a particular family.

Those inputs needs to be checked with an excel list.
image

If value is between column B and C, then result of column A needs to be passed to a parameter in the particular family.

I hope I made myself a bit clear

What if it isn’t between those 2 values?

When it’s not between those values in row 1, then it goes to row 2 and so one, till all rows been ran.
When even in the last row value not between the 2 values then “” needs to be passed to parameter.

I think this can help you

change the lacing to cross product on <= and >= nodes

That is what I was looking for I guess (Lacing -> cross product).

I am going to dive into it and come back to it if I got it managed (or not haha)

Still not totally perfect, but slowly getting there.
For example:
0List in RED=1 and RED=2 both are TRUE at 0List-1 -> I’d like to pass from BLUE=3, List1 (thisone1)
1List in RED=1 and RED=2 both are TRUE at 1List-2 -> I’d like to pass from BLUE=3, List2 (thisone2)

So in MAGENTA=4 I would like to see List-0List1 = “thisone1” instead of “item1”
So in MAGENTA=4 I would like to see List-1List2 = “thisone2” instead of “thisone1”

So now it takes this items from BLUE=3 in order (1ste, 2nd, 3th,…) instead of same listNR like the RED lists.

You need to create one more level on MAGENTA list, like this:

THANKS!!!
That did it :slight_smile:

I was on that direction, but did not accomplished it yet.
List.OfRepeatedItem I have to remember