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?
Hi Paul,
Are you using variables in eQL directly or to SQL?
Hi Manav...thanks for sticking with me on this one!
The code I've previously posted is what I'm dropping into the Attribute Query window. As I understand it eB takes EQL and converts it back to SQL anyway. As I've said, everything works fine apart from trying to reference the Session.Persion.Id variable.
I know we can not drop SQL query to eQL designer (or even attribute window) and expect it to work. I am not how it is working for you. May be I still don't understand where the problem is.Could you please send me the screen print where you put your query on attribute window, also the screen shot of the window where you mentioned it works when you mentioned the person_id as 3379.
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.