SCAN Function for Special Characters

Post Reply
User avatar
mce
Community Contributor
Posts: 352
Joined: Tue Jul 20, 2010 5:01 pm
OLAP Product: Cognos TM1
Version: Planning Analytics Local 2.0.x
Excel Version: 2013 2016
Location: Istanbul, Turkey

SCAN Function for Special Characters

Post by mce »

Hi,

When I use SCAN function to find character : in a text, it does not work.

Code: Select all

vFuncID = SUBST(vElement,1,SCAN(vElement,':')-1);
Is there anything wring with this? or is there a special way of using SCAN for special characters?

Any help would be apprecicated.

Regards
User avatar
Steve Rowe
Site Admin
Posts: 2464
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: TM1 v6,v7,v8,v9,v10,v11+PAW
Excel Version: Nearly all of them

Re: SCAN Function for Special Characters

Post by Steve Rowe »

If you are sure the : exists in vElement then perhaps try putting the ~ infront of the :

HTH
Technical Director
www.infocat.co.uk
User avatar
mce
Community Contributor
Posts: 352
Joined: Tue Jul 20, 2010 5:01 pm
OLAP Product: Cognos TM1
Version: Planning Analytics Local 2.0.x
Excel Version: 2013 2016
Location: Istanbul, Turkey

Re: SCAN Function for Special Characters

Post by mce »

I found my mistake. Here is the correct one.

Code: Select all

vFuncID = SUBST(vElement,1,SCAN(':',vElement)-1);
Post Reply