I am trying to make a function that tests two lists if the values of the first list are greater, equal, or less than the second list and output a chosen string. The native If node only has two outputs (true/false), this requires a third output.
So far I have this, but it only outputs one value, where I need each item in the list to be compared.
Longer explication of my goal: Trying to compare what the script has calculated as the required number of plumbing fixtures for the space to how many fixtures are placed in the model and create a color-coded filled region for each fixture type if the count is under, equal, or higher.
Welcome to the Dynamo community.
I don’t think it’s required to create a function for this task. You can simply use nested if in a code block as below:
As @AmolShah mentioned, you don’t need to go the Imperative route.
Though it can be done, when taking an imperative approach, you’ll need to think iteratively
@AmolShah I had something close to this early on. I think I used a different operator for the nested statement, and was getting an error about having the same input within itself? I wasn’t sure if the order and/or which item was nested mattered, it seems it does matter.