How to use session variable…..
Session variable: The session variable
contains the information of the user who logs in till he logs out...
Two types of session variables System
session variables and Non system session variables.
Create first
initialization block
Select edit data
resources
To make values in the
tuples as username and password for obi from table
( ex: reservation
database bus and routes are tables….to make values of busname and busid as obi username, password we should write a query in edit data source
place as Select busid from bus where
busid=':USER'and busname=':PASSWORD')
Now to set connection
pool click BROWSE button
Select connection pool
and click select button then click ok….
Then now click edit
data target
GIVE suitable session
variable name(EX:USER)
Then click yes …
Then click ok…
Finaly
give suitable name for session variable initialization blockand save….(EX:
TEST)
System session variable list….
Non system session
variable list….
For this
creation follow the same procedure but the order of creation should be same as
in the query selection column list…
(
Ex: Select
SIEBEL_USER_NAME,POSITION,LOB,ZONE,TERRITORY,FCO,USER_DETAILS,MANAGER,PASSWOR
from
EMP_INFO
WHERE
SIEBEL_USER_NAME=':USER' AND PASSWORD=':PASSWORD'
Session
variable Creation order
1)In
the above Siebel username is taken as system session variable for user login
2)
create non system session variable ‘POSITION’.
3) create
non system session variable ‘LOB’
4) create
non system session variable ‘ZONE’
5) create
non system session variable ‘TERRITORY’
6) create
non system session variable ‘FCO’
7) create
non system session variable ‘USER_DETAILS’
8) create
non system session variable ‘MANAGER’
9)
In the above PASSWORD is taken as system session variable for user login.)
Restart the services
Now try login using the values in the
table(EX:KSRTC as username 111 as password,
EX:SIEBEL_USER_NAME as user name and PASSWORD as
PASSWORD column from EMP_INFO )
On success
TO make prompt value defaulty
to set ,user who as logged in
1) log in as
administrator and generate report
In this select filter
for the prompt (ex:BUSNAME)
Give server variable as
NQ.SESSION_USER(i.e USER the system session variable which we have created)
save and logout
Now login as values in
table(EX: busname ksrtc and busid 111)
U will find default
values in prompt as logged in user value