Hi there. I have a transaction group I’m trying to set up, and in that transaction group I have a expression item. Purpose of this expression item is to read a tag value and assign a string return based on the numeric value.
Code:
switch(
{[Rim_Joist]BoardType},
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,
"Unknown",
"1X3",
"1X4",
"1X6",
"1X8",
"2X4",
"2X6",
"2X8",
"2X10",
"2X12",
"1X2",
"2X2",
"2X3",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown",
"Unknown)
This only returns null for a value, even when the tag is a value of 1. No idea why this doesn’t work. Any ideas?
Thanks!
Edit: that last line 'Unknown" was added, it didn’t work without it either. I thought maybe it needed something there to handle the ‘default’