Skip to main content

I have lines with multiple properties on each (such as Temperature Pressure FlowRate).  I'd like to use a function on each line label to display the value of only one of the properties at a time based on a global Page property "ShowProperty". 


So let's say the Page variable "ShowProperty" currently has the value "Temperature".  I'd like to be able to display the line property "Temperature" value based on the Page variable directly.


In Javascript the code I'm trying to replicate would look like this THIS[PAGE.ShowProperty] would be currently equivalent to THIS.Temperature.


If Page.ShowProperty was set to "Pressure" then THIS[Page.ShowProperty] would be equivalent to THIS.Pressure...


I'm currently using a series of nested IF statements and it's not very elegant. IF(PAGE.ShowProperty = "Temperature"THIS.TemperatureIF(PAGE.ShowProperty="Pressure"THIS.PressureIF(.....)))

Hi Chris


Thanks for posting to Lucid Community! I can see you're working with formulas and I'd be happy to help! Just to clarify is the formula working for you in Lucidchart? Also are you trying to make it look neater? If so there are some resources from our Help Centre that may be of assistance to you. The How to Use Formulas article and Developer Docs will provide you with more information about shape references. You could perhaps also have a look at Conditional Formatting and Icon Sets for more information on creating IF statements. 


Hope this helps!


Reply