Determining the Current Session ID in Kinetic Customization

We are trying to programmatically determine the current Session ID in a Kinetic Layer using Application Studio. Does anyone know how to determine this without using a function?

%session.context.sessionId%

3 Likes

For reference, you can access a lot of various variables in the session.context. You can view them in Dev Tools by turning on debugging mode, then typing epDebug.context.

4 Likes

Thank you Hannah, this was very helpful!

1 Like

This works great and similarly, we are trying to get the Instance Name from the %session.context.appServer%. Having some trouble with the syntax on parsing out the InstanceName though as it keeps interpreting functions as literals in Application Studio. Would you know how to do this or where to find documentation on this syntax?

An example of us just trying to get the position of the last ‘/’ in the appServer url:
{%session.context.appServer%.lastIndexOf(‘/’)} is resulting in it interpreting the function as a literal: {https://servername/instancename.lastIndexOf(‘/’)}

Try this:

%session.context.appServer%.lastIndexOf(‘/’)