Single Quote in Element Name

Post Reply
PlanningDev
Community Contributor
Posts: 349
Joined: Tue Aug 17, 2010 6:31 am
OLAP Product: Planning Analytics
Version: 2.0.5
Excel Version: 2016

Single Quote in Element Name

Post by PlanningDev »

Is there a way in a rule to reference an element that has a single quote (apostrophe) in the name?
User avatar
Martin Ryan
Site Admin
Posts: 2003
Joined: Sat May 10, 2008 9:08 am
OLAP Product: TM1
Version: 10.1
Excel Version: 2010
Location: Wellington, New Zealand
Contact:

Re: Single Quote in Element Name

Post 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
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
ccierpik
Posts: 16
Joined: Thu May 15, 2008 12:59 pm

Re: Single Quote in Element Name

Post by ccierpik »

You could joining text strings and using Char(39), for example 'SomeText' | Char(39) | 's String'
Gregor Koch
MVP
Posts: 263
Joined: Fri Jun 27, 2008 12:15 am
OLAP Product: Cognos TM1, CX
Version: 9.0 and up
Excel Version: 2007 and up

Re: Single Quote in Element Name

Post 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.
lotsaram
MVP
Posts: 3706
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Single Quote in Element Name

Post 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.
Wim Gielis
MVP
Posts: 3241
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Single Quote in Element Name

Post by Wim Gielis »

Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Post Reply