Changing a field value based on shape text

Started by whwaldrep, January 18, 2009, 10:11:25 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

whwaldrep

I'm doing alot of conditions in a flow chart.  I need to change a value if the shape text contains NOT CND.  here was the foumula I tried which works if the find word is in the text but gives error if missing I believe.


=IF(FIND("NOT CND",SHAPETEXT(TheText))=1,"0","1")

Thank you for your help.


EDIT*  I came up with this to use.

=GUARD(IF(STRSAME("NOT",LEFT(SHAPETEXT(TheText),3))="TRUE","0","1"))

Visio Guy

#1
Thanks for sharing the solution whwaldrep! I'm glad you figured this out.

It is not so obvious that strings can't be directly compared in the ShapeSheet. It is really important to know about the STRSAME function.
For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010