how to set a session varible in sc9.2

I’ve added 2 fields to the users table and I need to set one of these fields to be a session variable while that user is logged in. How would I do that?

I would like this to work so that I can limit what the user can see based on the value in the column.

basically I want to add a where clause in each grid and form to limit the results to that individual

users.unit is the field in the users table
master.unit is the field in the other table.

I need to have the grid and the form only display records where users.unit = master.unit

User1 is in unit A
User2 is in unit C
User3 is in unit B

records 1, 4, 6 9, and 11 are in unit A
records 2, 3, 5, 7,10 are in unit B
records 8, 12 are unit C

User 1 should only see Unit A records, User 2 should only see Unit C, and User 3 should only see Unit B.

thanks