Page 1 of 1

Single Quote in Element Name

Posted: Wed Sep 29, 2010 6:12 pm
by PlanningDev
Is there a way in a rule to reference an element that has a single quote (apostrophe) in the name?

Re: Single Quote in Element Name

Posted: Wed Sep 29, 2010 7:56 pm
by Martin Ryan
I think there is an escape character, but I can't think of it. The other alternative is to create an alias and reference the alias in the rule instead.

Martin

Re: Single Quote in Element Name

Posted: Wed Sep 29, 2010 9:56 pm
by ccierpik
You could joining text strings and using Char(39), for example 'SomeText' | Char(39) | 's String'

Re: Single Quote in Element Name

Posted: Wed Sep 29, 2010 11:40 pm
by Gregor Koch
Hi
Try putting another single quote in front of the single quote that is part of your element name.

Element Name: Blah'Blah

Rule: ['Blah''Blah']=N:1;

Cheers

Edit: Forgot the ending single quote, sorry.

Re: Single Quote in Element Name

Posted: Thu Sep 30, 2010 12:18 pm
by lotsaram
... goes without saying but always a very bad idea to have any kind of reserved characters in any TM1 object or element names. Especially ones that interfere with writing rules or MDX.

Re: Single Quote in Element Name

Posted: Thu Sep 30, 2010 12:37 pm
by Wim Gielis