Why "IF" doesn`t work for User.msvStructureType property?

Started by Hellboy, May 12, 2018, 07:48:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Hellboy

I have a list with header shape.
I try to add action to list to hide list header (use RMB on a list to see Hide header row).
I want not only to hide header shape but to exclude it from calculations of listItems positions.
I decide to do this by means of formula for header shape property User.msvStructureType=IF(User.Hide,"","Heading"), but it doesn`t work (value is evaluated but there is no result, list items overlap header). To update list change text of list item or add/remove any item (I don`t know another way to update list).
If I set this property to "" or "Heading" manually, everything is OK, but "IF" function doesn`t work and I don`t understand why.
The file with shape is attached.

Nikolay

Because dynamic switching shape into container/list is most probably not supported.
It is like trying to hide car's wheels by transforming it into a ship with a button click.
Might be possible for Optimus Prime, but i doubt it will work in Visio.

Visio Guy

Maybe instead of changing the type away from "Heading", just make the size of the heading shrink to zero.

You can hide the text too using the Miscellaneous.HideText cell.

That way, it doesn't matter that the heading is still there, since its size will be zero, and all of its bits will be hidden.

Will that work?
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010

Hellboy

shrink size to zero doesnt help,because pin point is still there,but I can move header outside of list group.

Hellboy

But it works for User.msvSDContainerHeadingEdge property :).
Thank you for all of you.

wapperdude

I don't have V2016, so, can only suggest without testing.  Suggestion, move the "IF" statement to either a scratch cell or to a new user cell.  Then use "setf" constructs in the true and false results to write the result into the User.msvStructureType cell.

So, your IF statement would be something like this:
IF(User.Hide,setf(getref(User.msvStructureType),""),setf(getref(User.msvStructureType),"Heading"))

This ought to avoid the problem you're having since it preserves the expected syntax for the StructureType cell.

Wapperdude
Visio 2019 Pro