Author Topic: "Left" function in color callout  (Read 2817 times)

0 Members and 1 Guest are viewing this topic.

kiler40

  • Sr. Member
  • ****
  • Posts: 328
"Left" function in color callout
« on: April 19, 2013, 08:03:22 AM »
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
Code
STRSAME("r",Prop.Row_1,TRUE)

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

OR JUST
Code
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

Surrogate

  • Hero Member
  • *****
  • Posts: 1015
    • ShapeSheet™ Knowledge Base
Re: "Left" function in color callout
« Reply #1 on: April 19, 2013, 08:26:32 AM »
what value may be in prop.row_1 ?

look about STRSAME function syntax there

kiler40

  • Sr. Member
  • ****
  • Posts: 328
Re: "Left" function in color callout
« Reply #2 on: April 19, 2013, 09:00:44 AM »
Value will be for example "R/W" of "R/G" or "R/whatever"

But the important symbol is "R"

Surrogate

  • Hero Member
  • *****
  • Posts: 1015
    • ShapeSheet™ Knowledge Base
Re: "Left" function in color callout
« Reply #3 on: April 19, 2013, 03: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.

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")

kiler40

  • Sr. Member
  • ****
  • Posts: 328
Re: "Left" function in color callout
« Reply #4 on: April 20, 2013, 04: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)

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


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