New Value to Parameter with Condition

Hello Dynamo people,

I am new to Dynamo and I am trying to add a value to a specific parameter (e.g. Comments) of a category (e.g. Rooms) with the following conditions :

  • If the parameter value is currently empty I just want to add the value “BBB”
  • If there is a already a value, I would like to add a coma “,” + “BBB” e.g. AAA,BBB

I have made this script but it is not working correctly. Depending on which rooms already has a value, the script behaves differently. Sometimes it is working, sometimes a room will be missed , and sometimes it will replace the value of an existing parameter without adding the coma in the between.

Can someone help me to figure out what I am missing ?

Please let me know if it is not clear :wink:

Thank you all for you help and have a great day !

:slight_smile:

I think you’ve got your nodes wired up wrong

You want to filter the elements

Try this

You’ll need to change some of the other wiring too

Hi Andrew,

Thank you for your reply.

I have tried to try filter the elements as you recommended and I have reconnected the 2 wires that you can see on the screenshot :

However, I have the text “Room” Showing up in the value after running the script :
image

image

Thanks again for your help !