Visio Guy

Visio Discussions => ShapeSheet & Smart Shapes => Topic started by: kiler40 on April 19, 2013, 01:03:22 PM

Title: "Left" function in color callout
Post by: kiler40 on April 19, 2013, 01:03:22 PM
Hi Everybody,

I`m trying to add Left function to a color callout, but for some reason nothing is happening.
Can you please help me a little-bit.

In the example i have 3 color callout. And in the shape sheet if i change first one that says
STRSAME("r",Prop.Row_1,TRUE)

and change it to
STRSAME(LEFT(Prop.Row_1,1)="r",Prop.Row_1,TRUE)

OR JUST
STRSAME(LEFT(Prop.Row_1,1),Prop.Row_1,TRUE)

It seems nothing to happen.... the box turns white.

Can you please tell me what i`m doing wrong...

Thank you in advance
Title: Re: "Left" function in color callout
Post by: Surrogate on April 19, 2013, 01:26:32 PM
what value may be in prop.row_1 ?

look about STRSAME function syntax there (http://msdn.microsoft.com/en-us/library/office/aa200253(v=office.10).aspx)
Title: Re: "Left" function in color callout
Post by: kiler40 on April 19, 2013, 02:00:44 PM
Value will be for example "R/W" of "R/G" or "R/whatever"

But the important symbol is "R"
Title: Re: "Left" function in color callout
Post by: Surrogate on April 19, 2013, 08:59:05 PM
Quote

STRSAME determines whether strings are the same. It returns TRUE if they are the same and FALSE if they aren't. To compare multi-byte strings or to do comparisons using case rules for a specific locale use the STRSAMEEX function.
(http://msdn.microsoft.com/en-us/library/office/aa200253(v=office.10).aspx)
in this case you are always get FALSE in these formulas. Because one left symbol never be same as long strings (for example "R/W" of "R/G" or "R/whatever")
Title: Re: "Left" function in color callout
Post by: kiler40 on April 20, 2013, 09:13:10 AM
It seems that i`m not changing the right thing. I have to change

Prop.Row_1
to
LEFT(Prop.Row_1,1)

STRSAME("r",LEFT(Prop.Row_1,1),TRUE)


in order things to work. And still use STRSAME :)
Thanks :)