Maximo Open Forum

 View Only

 Implicit Variable for Session ID?

  • Customizations
  • Everything Maximo
Toni Fields's profile image
Toni Fields posted 08-08-2023 08:18

Is there a way that I can create a relationship that only shows those records with the current session ID?

Let's say I have a view for records in a table that contains the sessionID for when the record was created within the PO object. I want a relationship that will compare the sessionID in that table with the current sessionID and only show those records for that session. I have created one for that will only show those records for that particular user using the :&USERNAME& implicit variable, but that won't work like I want it to if the user has multiple sessions open and working with the same dataset.

Is there some form of implicit variable for the session ID? Or can you somehow create your own implicit variable? Is there some other option that I can use?

Thanks for your help.

Sean Clark-McCarthy's profile image
Sean Clark-McCarthy

What are you trying to solve? 

I do not believe there is anything related to the current browser session available to the MBO.  Perhaps through the bean layers, but that's beyond my knowledge.

You may be able to play around with a relationship to the MAXSESSION table, not sure if these are the same sessionID's you are looking for, but you'd at least get a common session id for the user you could populate on the record, and use as a sub-query.

Toni Fields's profile image
Toni Fields

Sean,

I appreciate the response. I knew that I could use the implicit variable, &USERNAME&. I had already played around with a relationship to the MAXSESSION table to get the session ID for adding into a "temp" table, but I couldn't figure out how to "grab" the current session id to display only those records that were created during that session. I'm not sure if I'm explaining that well. 

In my case, I did finally find what I was looking for by adding 'MYUSERID=:&USERNAME& and MYSESSIONID=:session_id.maxsessionuid' to a relationship from the PO object. I wasn't aware that I could use relationships within a relationship. I learn something new every day. Anyways, thanks for your help.