Assign appropriate numbers to corresponding parameters

Hi everyone,

I have two lists. One contains the names of parameters, and using this list, I want to assign them appropriate numbers to corresponding parameters in the second list below. In the red Code Block, I want to achieve this: for each name, assign the corresponding number and place it in the RoomNumberElement. How can I make this happen?

Thanks in advance;)

The node there is a set parameter value node but you need to also bring the elements those parameters are from along for the ride

2 Likes

I have this but now need to adjust these rooms by this parameters.

Feed the parameter values you had in your first snip into the name and into the value. Along with thr room list.

You can flatten all the lists before they go in if the list structure of the elements doesnt match

1 Like

Hello, you can try to dig on the dictionary side (be careful the key must absolutely be a string)

Sincerely
christian.stan

1 Like

Maybe you know how to do that if the lists are differnt and sometimes there are no all names and I need to have these numbers in sequence and in each list they will be different. Beacuse in this example i need:
image

list0:
for"SYPIALNIA"=2
for “SALON Z…” =1
for “ŁAZIENKA” = 3,
for “GARDEROBA” = 4,
“PRZEDPOKÓJ” = 5,
“OGRÓDEK” = O1,
“OGRÓDEK” =O2,

list1:
“SALON Z…” = 1,
“ŁAZIENKA” = 2,
“PRZEDPOKÓJ” = 3,
“OGRÓDEK” = O

it is very important for me to get exactly this list so that there are always numbers from 1 in order in the list

if in list are two same names like for example
“ŁAZENKA”, “ŁAZIENKA” give them number in order and go with the next different name

I think is really hard to get that list but maybe you know some tricks

The list structure will need to match, so take your elements along for the same filtering ride as the value and names list, then you wont need to flatten at the end.

Is this different from your other post? They seem pretty similar and it gets confusing if you start duplicating or splitting topics without a valid reason.

yeah sorry i’m confused now.

Initially you were asking how to set the parameter value of the room to a correspionding list value.
That questions was answered.

But now it seems like you are trying to figure out the value of the paramater you are setting by counting the number of items in a list, but then your list currently is in order or 0,1,2,3, “O1”, “O2”

Perhaps mark your first query as solved and start the new question in another thread.