Request variable not overriding session variable in report filter

I have a dashboard edit prompt that saves value into a request variable with same name as session variable.
The session variable has "enable any user to set the value".
I have a filter in the report that has been converted to sql where the transaction date is greater than the value entered in the prompt.
I see the "SET Variable" clause at the top of the sql being sent to the server in the logs.
However, when I am in "View Logs", I see that the sql that is being sent to the database is sending the original value of the session variable instead of the new value in the request variable.
I have tried using VALUEOF(NQ_SESSION.variablename), VALUEOF(variablename), VALUEOF("Dynamic Initialization Block Name"."variablename"), @{biServer.variables['NQ_SESSION.variablename']} with no difference.
What am I doing wrong?

user4006070 wrote:
I have a dashboard edit prompt that saves value into a request variable with same name as session variable.
The session variable has "enable any user to set the value".
I have a filter in the report that has been converted to sql where the transaction date is greater than the value entered in the prompt.
I see the "SET Variable" clause at the top of the sql being sent to the server in the logs.
However, when I am in "View Logs", I see that the sql that is being sent to the database is sending the original value of the session variable instead of the new value in the request variable.
I have tried using VALUEOF(NQ_SESSION.variablename), VALUEOF(variablename), VALUEOF("Dynamic Initialization Block Name"."variablename"), @{biServer.variables['NQ_SESSION.variablename']} with no difference.
What am I doing wrong?When you created the prompt, did you make sure you set the variable type to Request variable?

Similar Messages

  • How to use request variables rather than session variables

    Are there any good examples? , I am constantly adding too many session variables in the fear they will get 'crossed over'.
    Like when you spawn new windows.
    how to refresh a page when the variable was passed on the URL.?
    A guide with all the varible passing methods woulbe be great.
    Regards
    Jonathan.

    See the other post:
    http://swforum.sun.com/jive/thread.jspa?threadID=50091&tstart=0
    The problem is when the page is reloaded when a button is pressed for example, the URL variables are gone.
    I know to to retrieve the variables, just having problems putting it all together.
    I'm trying to avoid using session varibles.
    Regards,
    Jonathan

  • Variable or Substitution String in Interactive Report Filter

    Background: I have an application that has a number of customized Interactive Reports where the Filter on the reports is set to a custom company name. When I install the application, I do not want to go through the reports and change the filter for the new company's name. The filters I need to change are all set by LOVs.
    Question: Is there a way that I can do one of the following:
    - associate a Filter with a Variable or Substitution String such that I can set that variable or string on login and then the user always sees the correct Filter displayed in the Interactive Report?
    - or is there a code method to update a sql apex table behind the scenes to reset the Filter to the new value. So that I could run that after installation as part of a customization / set-up time?
    System Info: 4.1.0.00.32
    Thanks,
    Stephen
    I used the IR_FILTER function, and while it allowed for a new filter to be set. It did not save the filter after logout or for other users accessing the Primary report. I could not find a SAVE Interactive Report function. So, my question still stands on looking for a method to set and save Filters programatically.
    Edited by: slsmith on Apr 19, 2012 8:07 PM

    Hi,
    I don't have access to an Apex 3 environment to check this, but I think that the Apex 4 Interactive Reports save the filters slightly differently and an attempt to mimic that functionality using IR conditions would fail.
    The only alternative I can think of right now is to have an additional column that returns 0 or 1 - eg:
    SELECT FIELD1,
    FIELD2,
    FIELD3,
    CASE WHEN (FIELD1 IS NULL OR FIELD2 IS NULL OR FIELD3 IS NULL) THEN 1 ELSE 0 END INCLUDE_NULLS
    FROM YOURTABLEand then apply a filter to INCLUDE_NULLS = 1
    Andy

  • How do I prepopulate a bind variable from a session variable?

    Hello. I have a scenario where I have a customer Id I need to set as the bind variable and then execute the query before the page comes up. How do I do this? Here's what I've tried (and why it didn't work)
    - I tried using the 'ExecuteWithParameters' method from the view object as a method in the task flow. I would then pass in the session variable as a parameter. For some reason it can never find the executewithparameters method on the view object. I'm guessing because it wants to go through the application module
    Next ...
    - I created a client method in the AM call setCust Id with the following code:
    public void setUserNameBind(String userName)
    System.out.println("Set param:" + userName);
    getFndUserVVO1().setNamedWhereClauseParam("UserNameBind", userName);
    getFndUserVVO1().executeQuery();
    This worked. However when I ran the debug it instantiates the VO again but with a NULL for the bind parameter. So on the screen it always has the NULL VO.
    Finally ...
    - I tried to put the method in the binding for the page as a method call. However, the method never got called before the page came up.
    This seems like a pretty simple problem. Any ideas?
    Thanks!

    Hi,
    1 - create a bind variable and add it to the ViewObject query
    2 - drag the ExecuteWithParams operation under the ViewObject (DataControl Palette) to the page
    3 - this is created as a button. In the source editor (NOT THE VISUAL EDITOR), delete the button so the binding remains
    4 - for the bind variable in the ExecutWeithParams, set its value to #{sessionScope.attribute_name}
    5 - in the bindings file, under executables, create an "invokeAction" entry and point it to the executeWithParams operation
    Frank

  • Use of a Session Variable in another session variable in OBIEE

    Hi,
    I want to use a session variable say A to calculate value of another session variable B. I am using valueof(NQ_SESSION.A) in the initialization block of variable B. But the result is coming blank. I know that the value exists. I have also set the precedence for B to run variable A first.
    Am I missing something here?

    vkos, it works fine for me as my first variable it's initialized when a user logins so the second variable can use its value. What you are trying to do it's not possible. It's not clear if the OP is trying to do the same thing but I will agree that if it is trying to initiliaze a session variable at runtime this is not going to work. You will either have to use presentation variables or update the session variable via GO URL or via Advanced settings in Answers. See the following posts:
    http://oraclebizint.wordpress.com/2008/02/28/oracle-bi-ee-101332-updating-session-variables-through-go-url/
    http://oraclebizint.wordpress.com/2008/02/25/oracle-bi-ee-101332-updating-session-variables-from-dashboards-using-presentation-variables/

  • Error: Variable not found in variable substitution table

    Hi,
    I am getting following error in file adapter receiver communication channel.
    error:Could not process due to error: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: java.text.ParseException: Variable 'file' not found in variable substitution table
    <b>variable substitution values:</b>
    Variable name: File
    reference       :payload:MT_DC_Recr,1,Target,1,Filename,1
    file name scheme : %File%.txt
    <b>inpu file:</b>
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_DC_Send xmlns:ns0="http://urn:psr/ff/DC">
       <Source>
          <Filename>dat1</Filename>
          <Record>
             <Name1>123</Name1>
             <Name2>abc</Name2>
             <Name3>XYZ</Name3>
          </Record>
       </Source>
    </ns0:MT_DC_Send>
    Regards,
    Srini

    Hi varun,
    This is the error i am getting now..
    Could not process due to error: com.sap.aii.adapter.file.configuration.DynamicConfigurationException: Error during variable substitution: com.sap.aii.adapter.file.varsubst.VariableDataSourceException: The following variable was not found in the message payload: File
    what i am trying to get is reading filename from the message payload.
    Reg,
    Srini

  • Customer Exit Variable not working in BO-Webi Report

    Hi All,
    I have created a universe based on Bex Query.
    Bex query consists of a customer exit variable on Calendar year/month where in it will populate current calendar year month by default while executing the query. It works fine while executing in SAP BI Bex Analyser.
    I have created a universe based on the query. For Calender year/Month i got L00, L01, LOV values in universe.
    Based on the universe I have created a Webi report. I did not specify calendar year/month as query filters. While directly executing the Webi report, I get the calendar year/month variable screen. But the value for it not populated based on customer Exit code written in BI.
    What has to be done to get the customer exit values in variable screen.
    Thanks for your understanding.
    -- Selva

    Since you have customer exit variable in your bex query, it will be like a global filter in your universe.
    Execute the webi report and check whether you are getting only current month data.
    --- Thanks

  • Custome Exit Variable Not prepopulating Parameter of CRE Report

    Hi
    I am using a customer exit varibale to pre populate a parameter in a Bex query I have created.  When I run the bex query the customer exit variable populates the parameter just as it is supposed to.  However when I use the bex query in Crystal Reports for enterprise the customer exit variable does not pre populate the parameter.  Is there something I need to do to make sure that CRE recognises the customer exit variable or does CRE not recognises them?  If it doesn't recognise them is it possible to create CRE level Customer Exit Variable?
    Many Thanks in advance
    Neil

    Hi Alun
    Thanks but I'm in BW so Stored procedures are not really an option on this one.  I suppose my primary question is, is there a reason that Customer Exit Variable is not working as it is creating a lot of difficulties by not populating the parameters in the same way it does in the bex query I am using to develop my Crystal report.
    Thanks
    Neil

  • How to pass session variable value with GO URL to override session value

    Hi Gurus,
    We have below requirement.Please help us at the earliest.
    How to pass session variable value with GO URL to override session value. ( It is not working after making changes to authentication xml file session init block creation as explained by oracle (Bug No14372679 : which they claim it is fixed in 1.7 version  Ref No :Bug 14372679 : REQUEST VARIABLE NOT OVERRIDING SESSION VARIABLE RUNNING THRU A GO URL )
    Please provide step by step solution.No vague answers.
    I followed below steps mentioned.
    RPD:
    ****-> Created a session variable called STATUS
    -> Create Session Init block called Init_Status with SQL
        select 'ACTIVE' from dual;
    -> Assigned the session variable STATUS to Init block Init_Status
    authenticationschemas.xml:
    Added
    <RequestVariable source="url" type="informational"
    nameInSource="RE_CODE" biVariableName="NQ_SESSION.STATUS"/>
    Report
    Edit column "Contract Status" and added session variable as
    VALUEOF(NQ_SESSION.STATUS)
    URL:
    http://localhost:9704/analytics/saw.dll?PortalGo&Action=prompt&path=%2Fshared%2FQAV%2FTest_Report_By%20Contract%20Status&RE_CODE='EXPIRED'
    Issue:
    When  I run the URL above with parameter EXPIRED, the report still shows for  ACTIVE only. The URL is not making any difference with report.
    Report is picking the default value from RPD session variable init query.
    could you please let me know if I am missing something.

    Hi,
    Check those links might help you.
    Integrating Oracle OBIEE Content using GO URL
    How to set session variables using url variables | OBIEE Blog
    OBIEE 10G - How to set a request/session variable using the Saw Url (Go/Dashboard) | GerardNico.com (BI, OBIEE, O…
    Thanks,
    Satya

  • Using Session Variables for User Login - sometimes they don't persist... what am I doing wrong?

    Hi all,
    I'm running a site that requires user login.  I approached the building of this site as almost a complete newb to CF (and dynamic coding in general), and it's been a great learing experience (with lots of help from you guys).
    However, I guess I never learned the correct way to handle a user login.  It seemed to me that I could just test the user-entered credentials against those stored in a database, then set a session variable containg that user's record number.  Then, not only would I have an easy way of knowing who this user was and therefore what info to serve him, but I could test for the existence of a valid login on every page in the protected folder, by adding this code to my application.cfc in that folder:
    <cfset This.Sessionmanagement=true>
    <cfset This.Sessiontimeout="#createtimespan(0,8,0,0)#">
       <cfif NOT isDefined ("session.username") or NOT isDefined ("session.password") or NOT isDefined ("session.storeID")>
         <cflocation url="../index.cfm" addtoken="no">
       </cfif>
    ...and it goes on to run a query and verify that the session.username and session.password match for the store defined by session.storeID.  If not, all session variables are cleared and it bounces you back to the login page.  When the user clicks Logout, all I do is delete all the session variables.
    This seemed to work great for like a year, but lately I've been getting reports that the login doesn't seem to persist for longer than approx. 20 minutes of inactivity.  You can see I specified session variables to remain active for 8 hours (I know that seems like a drastically long login, but it's what's necessary for this application).  I've only gotten this report from a few people, and I myself can't seem to duplicate it... I've tested an inactive login for 45 minutes now and it held.
    SO:  any reason you can think of why session variables would be spontaneously clearing for some people?  Would having your router reset its IP address invalidate the session or something?  Also, the problem seemed to begin appearing after my host upgraded all their servers to CF9... could there be any relation?
    And on a more general note... did I go about this completely the wrong way to begin with?  If so, what's the standard way to manage a login?
    Lots of questions, I know... thanks very much for any answers or suggestions!
    Joe

    Ian,
    Thanks very much - very helpful information.
    Sounds like passing the tokens in every request is probably the way to go for this.  I don't think it's likely that any users will be sharing links, unless they actually intend for the recipient to see their info anyway.
    Is that all I would have to do, is add the tokens to every path?  Would that guarantee that all the session variables would remain valid until timeout or being cleared?
    Again, thanks, you've been really helpful.
    Joe
    On Jun 23, 2010 4:37 PM, Ian Skinner &lt;[email protected]&gt; wrote:
    Unfortunately this is the nature of HTTP web applications.  There is NO state maintained from HTTP request to request.  This is by design in the HTTP protocol specifications.
    ColdFusion provides two methods to circumvent this limitation.  Each method has limitations and caveats.  They both rely on the passing of tokens between the client and the server with every request.  These tokens can be passed as cookies OR URL (GET) variables.  You are using the cookie method, which is the simpler and most common. You may be experiencing the limitation of this method.  If something happens to the cookies the session can be lost.
    You could pass the (CFID &amp; CFTOKEN) OR JESSIONID tokens through the URL query string with every request.  This requires one to add these values to every link, form action, cflocation or other request path in our application.  ColdFusion provides the session.urltoken variable to make this easier to do.  The tokens will be visible to the user.  Also if the links with an individual token is share with other users, via e-mail, chat, social networks, etc and one of these users utilize the link during the life of a session (8 hours apparently in your case).  Then that user will access the session of the original user.
    Cookie session management is by far the most common choice by CF developers.  If these methods do not meet your needs you would need to go beyond the HTTP limitations of web applications.  One might be able to accomplish this with a Flex|Air|Flash applications that can be configured to use a continuous connection to the server.  Thus not suffer the stateless nature of the normal HTTP request-response cycle.
    I do not know if a router resetting would cause cookies to be discarded or otherwise invalidated.  But I would not think it is beyond the relm of possibilities.

  • Session Variables Help

    Hi, all. I posted questions before when I was stuck, and you
    all were very friendly and helpful. I am having difficulty
    understanding how to create, POST() to, and then REQUEST()
    information stored in session variables using Dreamweaver. I am
    developing the pages using PHP, and have a MySQL database uploaded
    and working. Displaying, editing, and adding to the database is
    ongoing, as I type!
    Adobe has thankfully started the session for me with the
    <?php if(!isset($_SESSION)) { session_start(); } ... because I
    have a log in/log out server behavior on the pages.
    I need to add two pieces of information collected from the
    page, one value of which is inputted by the user on a form, and the
    other value is obtained from values from the part of the recordset
    shown on the page. What I expect I need is something like a
    2-dimensional array to store both sets as a pair, but while I
    expect I can do this, I am really not sure. The documentation ends
    before fully explaining this part.
    An example of what I am trying to do is a product detail page
    from an on-line store catalog, with an "add to cart" button. The
    person has navigated to that page, shows the information for
    productID=1497 with an input field for quantity, so a person can
    order more than one of that product if they choose, and an "add to
    cart" button which would write the productID and quantity values to
    the session variable. Is there a simple and easy to use Dreamweaver
    feature I am missing that can do this?
    If I need to code this myself, are there good resources for
    figuring this out? What I've found thus far is either too basic, or
    too advanced. I've been using Dreamweaver's Insert>Date
    Objects> menu to get everything done thus far.
    Of course, once the session variables are created I will need
    to $_REQUEST() the information on a later page and display it on
    one of Dreamweaver's dynamic tables. I hope that once I understand
    how to $_POST() the values to the session variable, $_REQUEST()ing
    the information on another page will be apparent.
    Also, please don't assume I know anything more than what I
    wrote in my post. I may be an old school programmer, think punch
    cards and FORTRAN, but I can get lost easily on things most people
    nowadays think are pretty basic.

    I got it fixed. It took two weeks to figure out the solution,
    but...
    It all boils down to the fact that you can get away with
    sloppy programming if your MySQL database is located on 'localhost'
    that you can't get away with if it is located remotely.
    Basically, you need to activate the database before you make
    a mysql_query. My bad. Problem solved. And now that I know I need
    to do this, problem never rediscovered.
    ~ Scott
    oldcountrypeddler.com

  • Help building an object, setting it in a session variable and casting

    Hi all,
    I have a problem that I hope you can help me with. The application I am working on has a simple MVC design architecture. The problem occurs when a request is made from the application to the controller servlet. The controller servlet looks at the request type and delegates the processing to the appropriate action and model classes. The model class returns an object of a specific class type that is put into the session variable. This session variable is then cast to the appropriate class type in the jsp that renders that class. The problem is that this particular class type has an array of another class type. The array is filled in the class constructor, but is null when returned to the controller.
    At run time when accessing the array I get a NullPointerException error. I can't seem to figure this one out. Any help is greatly appreciated.
    Here's the code:
    Controller DoPost method. The 'Action' objects are defined and initialized in the init() method.
            public void doPost(HttpServletRequest request, HttpServletResponse response)
            throws ServletException, IOException{
                    try {
                            HttpSession session = request.getSession();
                            MemberProfileTbl memProf = (MemberProfileTbl)session.getAttribute("Member");
                            RequestDispatcher rd;
                            if (!validateUser(memProf, session)){
                                    session.setAttribute("LoginStatus", "Session Expired");
                                    rd = getServletContext().getRequestDispatcher("/LoginFail.jsp");
                                    rd.forward(request, response);
                                    return;
                            String act = getAction(request);
                            Action action = (Action)actions.get(act);
                            Object result = null;
                            try {
                                    result = action.perform(request, memProf);
                            }catch (NullPointerException npx) {
                                    npx.printStackTrace();
                            session.setAttribute("currObject", result);
                            rd = getServletContext().getRequestDispatcher("/test/MemberConsole.jsp");
                            rd.forward(request, response);
                    catch (Exception ex){
                            ex.printStackTrace();
    Action class:
            package accolo.actions;
            import javax.servlet.http.*;
            import accolo.model .*;
            import accolo.view.*;
            import accolo.db.MemberProfileTbl;
            public class ChangeMainView extends Action {
                    public String getName() {return "changeMainView";}
                    public Object perform(HttpServletRequest request, MemberProfileTbl memProf)
                            throws Exception, ClassNotFoundException, InstantiationException, IllegalAccessException{
                            Object result;
                            HMMainView hmMain = new HMMainView(memProf.email);
                           result = hmMain;
                           return result;
    HMMainView.java class
    public class HMMainView
            private HMMainViewJob[] jobs;
            public String test;
            public HMMainView(String email)
               HMJobsBean hmJobsBean = new HMJobsBean();
               JobTblDao jobTblDao = new JobTblDao();
               test = "test in constructor";
               try{
                 JobTbl[]  hmJobs = jobTblDao.getHMOpenJobs(email);
                 for(int j = 0; j < hmJobs.length; j++){
                            this.jobs[j].jobTitle = hmJobs[j].optionalTitle;
                            this.jobs[j].city = hmJobs[j].city;
                            this.jobs[j].state = hmJobsBean.getState(hmJobs[j].zipCode);
                            Hashtable counts = hmJobsBean.getJSCountsByStatus(hmJobs[j].jobId);
                            this.jobs[j].unranked = (String)counts.get("CANUNRANKED");
                            this.jobs[j].interviews = (String)counts.get("HMRI");
                            this.jobs[j].ranked = (String)counts.get("CANRANKED");
                            long closed = Long.parseLong((String)counts.get("HMRNI"));
                            closed += Long.parseLong((String)counts.get("HMCH"));
                            closed += Long.parseLong((String)counts.get("HMNH"));
                            this.jobs[j].closed = Long.toString(closed);
                }catch(Exception ex){
                    ex.printStackTrace();
            public HMMainViewJob[] getJobs(){ return jobs; }
    HMMainViewJob.java class
    package accolo.model;
    public class HMMainViewJob
            public long jobId;
            public String jobTitle;
            public String status_id;
            public String city;
            public String state;
            public String unranked;
            public String interviews;
            public String ranked;
            public String closed;
            public HMMainViewJob()
    Snippet of JSP that uses the code
      Object result = session.getAttribute("currObject");
      if (result != null){
        String className = result.getClass().getName();
        if (className.equals("accolo.model.HMMainView")){
               header = "HM/HMConsoleHeader.jsp";
               subNav = "HM/HMConsoleSubNav.jsp";
               user = "HM/HMConsoleUser.jsp";
               left = "HM/HMConsoleLeft.jsp";
    //           body = "HM/HMConsoleHome.jsp";
               HMMainView hmMain = (HMMainView) result;
               HMMainViewJob[] jobs = hmMain.getJobs();
              for (int i = 0; i < jobs.length; i++){
    %>
                    Jobs: <%=jobs.jobTitle%>
    <%

    I have not run this through a debugger yet. I don't have immediate access to a debugger to run it through, most of the development is simply done in vi. I was hoping any problem in the code would jump out at someone. I've been staring at it too long.
    I'll try to get a debugger set up.
    Thanks

  • Session variables being lost

    In my onApplicationStart method (which should tell you I'm
    using an Application.cfC, not cfM), I have a cfif loop that passes
    a value to a custom tag and returns a form variable. I'm then
    reassigning that variable to a session variable. In IE, this works
    just fine; in Firefox, though, the session variable is NOT being
    set.
    What might be causing this, and is there a workaround?

    The issue referred to an external CF custom tag, which called
    another demo application to set a testing user. However, after
    further testing, I realize that demo app won't function properly
    with this application, so I've removed it.
    Authentication is being set by an LDAP query; this
    application that I am working on is going to be a sub-application
    of a larger application, and the authenticated user is being set as
    a session variable as well (I think...). However, I'm creating a
    new session variable for this application, and simply passing the
    authenticated user into my app (the outer app uses the variable
    auth_user; I'm using the variable authuser, so there is no name
    conflict).
    Again, it is IE that is not persisting the session. Firefox
    is doing so. I have looked in the advanced settings for IE, and
    there is nothing about persisting session variables to check or
    uncheck. Also, this application will probably be used mostly by
    users using IE 6 with default settings, so I'm going to need to
    find a workaround for IE.
    Your help is most appreciated.

  • Selection variable not working properly on portal

    Hi,
    We have a report in which Survey is a selection variable(Not a mandatory variable). If I select Two or more surveys simultaneosuly in the initial selection screen, then the Portal is not displaying the data. PFB screenshot of the selection.
    If I select the same two surveys individually in the selection screen, then the portal outputs the result. If I execute without selecting any survey and then apply a filter (after the output is generated) for those two surveys together, then also the data is displayed properly.
    Kindly note that this report is being used by German users and the problem exists only when the Language preferences of the portal is changed to German. With English Language Preferance, the selection variable works properly.
    Please suggest if anybody has faced a similar issue
    Regards,
    Keerthan

    Hi Lakshmi,
    The texts are maintained for those survey values and even with German Language Key, still not getting the output.
    If i select them individually, then I am getting the output.
    For instance, I have selected the surveys "0000084001" and "0000090001" together in the selection screen(I have inserted the Pic in the original post, but i am sorry it is not clear in that) and not getting the output or it hungs up in the execution state.
    If i select the same survey "0000084001" only, then I get the output.
    This is the same case when I select only "0000090001".
    This scenario is only with German Preferance.
    If i change the preferance to English and select these two surveys together, then it outputs the result.
    Regards
    Keerthan

  • What is session variables in BSP

    Hi
    I am using using IC Webclient. can anyone help me to findout the details about session varibales ?
    Best Regards
    Bhavishya

    hi,
    Session variables is a handy way to define a persistent variable.The standard variables used in ColdFusion can be only transferred or sent to the next page before it is necessary to restate the variable. In some situations, you may want to define a variable that will apply to all the pages during a single session of the user. An example is when the pages a user sees are personalized to his or her specific needs. In such a case, session variables are defined and used.
    Session variable persistent
    A session variable is one of several types of variables that persist across multiple templates:
    >Server variables - Accessible by all clients and applications on a single
    >Application variables - Tied to a single application and accessible by multiple clients
    >Client variables - Tied to a single client over multiple sessions
    >Session variables - Exist for one client or browser during a single session
    >Cookie variables
    Session variables are designed to hold information that you seldom write but are read often.
    Defining session variables
    Session variables are normally defined in the Application template, but can be also defined on all applicable pages.
    Application template
    The standard method of using session variables is to define them in the application.cfm template, which is a special ColdFusion page that is processed before the other pages in a session. It usually should be in the session root directory.
    CFAPPLICATION tag
    To enable the use of session variables, as well as client and application management, you should use the CFAPPLICATION tag in the Application template. A typical tag would be:
    <CFAPPLICATION NAME="Name"
    SESSIONMANAGEMENT="Yes"
    SESSIONTIMEOUT="#CreateTimeSpan(0, 0, 20, 0)#">
    where:
    >NAME is required to avoid problems if you have session variables tied to separate applications.
    >SESSIONMANAGEMENT is required to enable the session variables.
    >SESSIONTIMEOUT is optional and limits the time the variables will stay in memory (20 minutes in the example) Note that the default is 20 minutes, so you really may not need this unless you want to change that number.
    Setting variables
    After the CFAPPLICATION tag, you can set your session variables, using the CFSET tag. You must always refer to session variables with the prefix session. Thus, you could define a session variable, such as:
    <CFSET session.name="#form.othername#">
    Should lock variables
    You should lock the session variables to avoid problems when several people are using the system at the same time. An example of this is:
    <CFLOCK TIMEOUT="30" NAME="#session.sessionID#" TYPE="Exclusive">
    <CFSET session.name="#form.othername#">
    </CFLOCK>
    Defined on applicable pages
    A problem in using the Application.cfm template is that it is often difficult to change your session variables, once they have been set. An alternative is to use the CFAPPLICATION tag in each applicable page:
    <CFAPPLICATION NAME="Name"
    SESSIONMANAGEMENT="Yes">
    You then can define the session variable in the first page, accessed:
    <CFOUTPUT QUERY="return">
    <CFSET session.ID="#ID#">
    </CFOUTPUT>
    This is a compromise between the standard method and defining the variable on each page.
    Example of use
    Suppose a user logged in to the site. His name could be sent through a form and entered in Application.cfm. Then the session will constantly refer to him by name.
    Application.cfm
    <CFAPPLICATION NAME="Name"
    SESSIONMANAGEMENT="Yes">
    <CFSET session.name="#form.othername#">
    Start.cfm
    <CFOUTPUT>
    <H1>Hello #session.name#</H1>
    </CFOUTPUT>

Maybe you are looking for