In a visio assinged to a protocol I want a shape that shows the text of the Element Description, if it exists, or otherwise just show the Element Name
In this screenshot we see both the Description and the Name.
The best way I can come up is to have two shapes layer over each other.
The top shape with [Description] and the behind shape [Element Name]
Then to use conditional actions to Hide the top level shape [Description] if the Description is not set at all within the element and is an empty string or null value.
Here is a test shape I have for the description to attempt to hide it if it is not set.
<A>-A|Element:[this element]|Description|=null
I have tried numerous variations of the Hide conditions, or even tried reversing logic and using Show instead but have reached a dead end.
<A>-A|Element:[this element]|Description|=null
<A>-A|Element:[this element]|Description|=
<A>-A|Element:[this element]|Description|=""
Is it possible to hide a shape based on the element not having a Description?
Or otherwise an alternate approach I could take to achieve the desired outcome highlighted above
Hi Sam,
It does no look like we can use the Hide/Show function with the Element Description field. However, as a work around, you can create a custom property (right click element and select properties, then custom. Click the gear (bottom left) to add new property). In my case I created one called 'DescUsed' and set the value to 1 for used then blank or 0 for not used. Once this is setup you can add a Shape Data Field of 'Show' to your shape with the value being:
<A>-A|Element:MS Platform|Property:DescUsed|=1
<A>-A|Element:[your element name]|Property:[your custom property name]|=1
As for Displaying the shapes, you are correct and will need two stacked shapes. However, using this property method you can use 'Show' for the Description and 'Hide' for the Element Name shape, when the [custom property]=1, to reduce the number of shapes used when rendered in Cube, though not necessary.
Thank you Steve for confirming that wasn’t possible
Thank you for the workaround example.
And Great tip making sure to Hide the other shape when not needed to prevent shape doubleups