COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Framework Manager => Topic started by: cogboy on 16 Oct 2007 07:33:14 PM

Title: Extract from session Parameter
Post by: cogboy on 16 Oct 2007 07:33:14 PM
Hi Everyone

I am a metadata developer.

I have a problem in my project.

I have to extract first three letters from the session parameter.

For example:   
     session Parameter:   account.personalinfo.username
             value:                FTW23838


I want only FTW from this.(only first three letters.

I tried to substring but it dint work can any one help me

question:   should i use substring/  make custom session parameters in LDAP.

Thanks

Regards

Cogboy
Title: Re: Extract from session Parameter
Post by: rockytopmark on 17 Oct 2007 04:32:33 PM
This works for me:

substring(#sq($account.personalInfo.userName)# ,1,4)
Title: Re: Extract from session Parameter
Post by: cogboy on 18 Oct 2007 09:13:21 AM
Hi First I like to Thank you for replying

I tried this code in creating a query item i got the result.

When i am trying to use in parameter map its showing error.


For example:

[querysubject][queryitem] =#$New_Parameter_Map{'substring(#sq($account.personalInfo.userName)# ,1,4)'}#


note:i tried using with and with out single quotes.

Please tell your opinon

Thanks

cogboy

Title: Re: Extract from session Parameter
Post by: rockytopmark on 18 Oct 2007 11:59:40 AM
You have to work out the usage of the # qualifiers.  I would say that you may not be able to do what you want in a single Query Item.
Title: Re: Extract from session Parameter
Post by: cogboy on 18 Oct 2007 12:50:11 PM
Can you be more detail please
Title: Re: Extract from session Parameter
Post by: rockytopmark on 18 Oct 2007 02:43:21 PM
#inside this symbol is macro# outside is not
Title: Re: Extract from session Parameter
Post by: cogboy on 18 Oct 2007 09:35:27 PM
I tried that also its giving error.
Is there any work around

Thanks

Cogboy

Title: Re: Extract from session Parameter
Post by: rockytopmark on 19 Oct 2007 01:12:58 PM
Not sure what you mean by "tried that"

ust exlpaining what the # symbol indicates...  it is a qualifier for when macro language starts and ends.

Workaround?  No, you need to use Macro Languauge.

My guess is you just haven't typed the syntax in correctly.