AnsweredAssumed Answered

I want to extract session Id of the Resources who is logging to Clarity through Portlet.

Question asked by pkumar74 on Aug 25, 2014
Latest reply on Aug 26, 2014 by pkumar74

I am creating a portlet, In this i wanted to display the user_id of the resource,who is using this portlet.

Ex:- if i will login then i wanted to see my ID into portlet result, if someone else is using then they should get their ID.

For this i am using below N-SQL, but not getting any data.

1.>

SELECT   @SELECT:DIM:USER_DEF:IMPLIED:RESOURCE:C.ID:ID@
     
       
FROM     CMN_USER_SESSION_V c

where c.token= @WHERE:PARAM:XML:string:/data/sessionId/@value@


AND  @FILTER@

 

After using this one i am not getting any data in my portlet.

Hence i have modified my query as below.

2>

SELECT   @SELECT:DIM:USER_DEF:IMPLIED:RESOURCE:C.ID:ID@
     
       
FROM     CMN_USER_SESSION_V c

where c.session_id= @WHERE:cast(substring('PARAM:XML:string:/data/sessionId/value')1,8)as integer @


AND  @FILTER@

When i am using this one getting an Error "NPT-0109: The construct @WHERE:cast(substring('PARAM:XML:string:/data/sessionId/value')1,8)as integer @ cannot be interpreted"

Please suggest me how can i fox the issue, and i can print session_ID/ID in my portlet.

 

Thank you so much in Adv.

 

Regards,

Prakash

Outcomes