Hi, I'm trying to reference the Session Id in an Attribute Lookup Query to bring back the current 'user' and 'organisation'...I'm using $Session.Id for the variable but it's not recognizing it. Any ideas? Am I wasting my time?
Thanks
Paul
Hi Paul,Could you please help us to understand what query you are using for Session ID?It should be allowed to use session id for query.
Paul,
Have you tried $Session.Person.Id for Person? Session.Id is for session not for the logged on person's id.
Hi Manav,
Thanks for getting back to me on this. To be honest it's been a while since I posted the 'cry for help' and I've forgotten
the initial query I needed it for. Let me try and find the code and use your suggestion so see if that works.
I will let you know if it's a success or not.
Regards
Manav,
Okay...still getting a problem....this is the Attribute Lookup Query...
SELECT dbo.documents.prefix + ' - ' + dbo.documents.title AS value, dbo.org_persons.person_id, dbo.organisations.organisation_code FROM dbo.documents INNER JOIN dbo.organisations ON Substring(dbo.documents.prefix, 8, 3) = dbo.organisations.organisation_code INNER JOIN dbo.char_data ON dbo.documents.document_id = dbo.char_data.object_id INNER JOIN dbo.org_persons ON dbo.organisations.organisation_id = dbo.org_persons.organisation_id WHERE ( dbo.char_data.char_id IN ( 9, 11, 17 ) ) AND ( dbo.char_data.char_value = 'Inspection and Test Plan' ) AND ( dbo.documents.current_revision = 'y' ) AND ( dbo.org_persons.person_id = $Session.Person.Id ) AND ( dbo.documents.template = 'n' )
When we Test Query we get Invalid pseudocolumn "$Session"
Any ideas?
Paul,You are running query on Database or using eQL query builder as above query is SQL and I was thinking you are running eQL query for Attribute Lookup?