Changing text on label based on numerical value of a text parameter

Changing text on label based on numerical value of a text parameter

DanishPencil
Explorer Explorer
2,592 Views
2 Replies
Message 1 of 3

Changing text on label based on numerical value of a text parameter

DanishPencil
Explorer
Explorer

Hi there.

I'm attempting to make a tag that varies based on a shared text parameters value. As you can see in the screenshots, doors have a parameter named "Brandklasse" (Fire classification) which we set to a number between 1 and 10. And we'd like to have a fire classification tag (the left one) report just the number, and a door type tag that reports a text string based on what number is punched into the parameter.

So for example, if the door is classified with a 1, the door type tag would read El2 30, if it's a class 2 the tag would read El2 30-c and so on.

I can't seem to figure out if i can even use a text parameter as part of an "if" statement.

I hope that made sense 😅

0 Likes
Accepted solutions (1)
2,593 Views
2 Replies
Replies (2)
Message 2 of 3

ToanDN
Consultant
Consultant
Accepted solution

Brandklasse must be a Number  or Integer Parameter, yours is a Text parameter so it cannot be used to drive a formula.

 

Assume Brandklasse is a shared Integer parameter in door families,  create a label in door tag, load Brandklasse when you are in the label dialog window, add a calculated text parameter to the label and use the formula: if (Brandklasse = 1, "El2 30", if (Brandklasse = 2, "El2 30-c", " ")).  The formula is an example so I only show  2 values. Expand it if you have more values to define.

0 Likes
Message 3 of 3

DanishPencil
Explorer
Explorer

Thank you so much. I did manage to eventually figure out that text parameters can't contribute to or draw from other parameters, but i would have spent ages looking for the correct parameters to use instead, was it not for your help. You da goat.

0 Likes