It sounds like you are trying to use some key to display a variable amount of data. What I'd do here is use hhmach_key to pull the data from the various columns into a few calculates. For example on for machine, one for brand, etc.
Once you have that data out of the CSV and into the form, you can use use the normal form syntax to display as much or as little as you'd like. One easy way to do that is to use the note data type and in your label put something like this.
key: ${key}
brand: ${brand}
model: ${model}
And if you want to have customized views, make different notes with different labels and use relevancy to show the appropriate ones at the appropriate times.
P.S. The if syntax is very precise: if(condition, a, b). If condition is true, then a, else b.