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
Paul,
Have you tried $Session.Person.Id for Person? Session.Id is for session not for the logged on person's id.
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?
Sure Manav......files attached.
Can this issue be closd?
Hi Carma,
Manav is still trying to help me with this one and we haven't reached a solution yet.....so I would like the issue to remain open please.
Hi Manav,
You asked another question and I sent you through some screen grabs yesterday but for some reason that part of this thread seem to be missing.....did you actually get the screen grabs etc.?
Hi Paul,I tried many ways but could not able to get the code work. After all possible ways, I consult with the engineers who develop the query builder and found that you cannot pass session information into SQL statement using Attribute lookup query builder. You have to give session Id or Person id to get the list.
I am afraid we have to choose session Id as you provided 3379 as example earlier.
I was afraid you were going to say that....but if the engineers say it can't be done then it can't be done.
Thank you for you efforts on this though...your time has been much appreciated.
Regards