How to a session variable in another initialisation block?

Hello all,
I think I overlook something. So hope someone please can help me out.
I have 2 initialisation blocks.
The first one has as a source a LDAP server.
Now I fill a session variable called mail by the LDAP server.
When I click on test I will see my mail address.
lets say I see [email protected]
No I want to do something with that subdomain.
So I made a new initialisation block with the database as the source.
And made a query
select case when upper(:mail) like 'subdomain%' then A else 'NO Domain found' END from dual
but this doesn't work, and really don't understand why!! (and ofcourse I am using the executed precendence option to initialise first the other initaialisation block)
also when I change the query in:
select case when upper('[email protected]') like 'SUBDOMAIN%' then A else 'NO Domain found' END from dual
then it al works fine..
Hope anyone can help me out!!
Best regards,
Remc0

Does the Init Block really fails? Could you please set the logging level to 2 in that user and review both the NQuery and Presentation Services log files? Can you try with a simply select statement:
SELECT upper(VALUEOF(NQ_SESSION.MAIL)) FROM DUAL
to make sure the new variable is getting initialized? It could be that the value from the LDAP server has trailing or leading spaces?
Also I don't see why you need to put the domain on another session variable, you could do your filter using the case statement directly. Unknown to many a CASE statement can be used in a WHERE clause as well. Sample SQL:
WHERE COLUMN = (case when upper(VALUEOF(NQ_SESSION.MAIL)) like '%SUBDOMAINY%' then 'SUBDOMAINY' else 'NO Domain found' END)

Similar Messages

  • How set a SESSION variable?

    How set a SESSION variable?
    There is a standard object where could do this?
    Thx in advance Roberto.

    >I'm not at all sure that you CAN change the portal language in the way that you want.
    >Perhaps you should repost this question in the portal forum.
    No i manage the language of WebDynpro myself, with tables from R3.
    I wanna do only a thing like HTTP SESSION variable from the WEB.
    I could do it, using java function of servlet, but i don't wanna use third packege out of WebDynpro FRAMEWORK.
    The isn't an OBJECT CLASS STANDARD od WebDynpro that do that?
    I wanna PERMANENT variable from a WebDynpro to another.
    It is an implicit variable passage.
    No one did something of similar?
    Bye
    Message was edited by: giovanni angerame

  • 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

  • How to use session variables in initialization blocks

    Hello,
    I want to use a session variable in a initialization block. Here is what I was doing to see this working
    I created a init block called name_parameter and associated with a variable target named name_parameter_v. The init string for this block is "select 'Hello' from dual".
    i created another init block name_parameter2 and associated with a variable target named name_parameter2_v. The init string is "select :name_parameter_v from dual".
    I have selected name_parameter in the edit execution precedence for name_parameter2.
    The result set is empty. Could you please explain why I am not able to see Hello when i test name_parameter2.
    Thanks.

    to obtain the value contained in a session variable this is the syntax.
    select 'VALUEOF(NQ_SESSION.VARIABLE_NAME)' from dual
    mind the single quotes, they are necessary

  • How to use session variable in JSP function  & How to use both JSP  Servlet

    Hi,
    I am new to JSP and servlets
    Still I am devloping a website in JSP. I am not mixing JSP with servlets, but I do create Java files for bean, logic and database works.
    I try to keep the hard coding part out of JSP.
    I dont how to use both JSP and Servlets in combination.
    Hence If needed I write some functions in JSP.
    but it gives me error
    +<%! public void abc()+
    +{+
    int intUserId = Integer.valueOf((Integer) session.getAttribute("MySession_UserID"));
    +}+
    +%>+
    Saying cannot find symbol session
    1) So can u please tell how can I access session variables within JSP function
    2) And also give me some links/tutorials about useing both JSP and Servlets in combination.
    Thanks
    Venkat

    The application architecture when you use Servlets and JSP in a standard MVC pattern is explained here (under the heading "Integrating Servlets and JSP Pages") and here ...

  • How to get a variable into another block?

    Hello,
    (I am from Germany, so be patient due my english please)
    We do a project at our University where we have to do with wordfrequencies. The app works fine, but it cannot works with the variable wich contains the information to analyse.
    Look, I am more or less new in Java and I found a code and modyfied that. So I had to initalize the variable with the data from another class. I did the following thing.
    Thats is the class, where the variable is come from:
    class Lesen extends HTMLEditorKit.ParserCallback                                        
         String zeile;                                                                           
         String fileName;                                                                
         Wortfrequenz aha;                                 // name of the class where I need the variable                                                                                                                                                                      public Lesen (String fileName)                                                          
              this.fileName = fileName;                                                      
    public void handleText(char[] data, int pos)                                            
                    String strom = new String (data);                                       
                    aha = new Wortfrequenz ();                                              
                    aha.verb(strom);                // "strom" is the variable here in this class which caontains the data
    ....and within the class "Wortfrequenz" I tryed to do the following thing:
    import java.util.*;                                                                     
    import java.io.*;                                                                       
    public class Wortfrequenz
         static String flus;                                                                     
         public void verb (String o)                                                             
              flus = o;                                                                       
    HashMap words = new HashMap();                                                         
    HashMap stopWords = new HashMap();                                                      
    String delim = " \t\n.,:;?!-/()[]\"\'";                                                 
    String file;                                                                            
    String word;               
    Count count;                                                            
                    try
                            FileReader kl = new FileReader("stopwords.txt");                
                            BufferedReader mk = new BufferedReader(kl);                     
                            String einlesen;
                            Lesen eins = new Lesen(flus);                                   
                            while ((einlesen = mk.readLine()) != null)                      
                                    stopWords.put(einlesen, einlesen);                      
                            mk.close();  if I test the app and do a "System.out" direktly after
    flus = o;then I can see that the information is within the variable, but when I test the variable within the next block where I need it, for example after
    Count count;or anywhere in this block, then I get
    null
    null
    null
    null
    null
    ...if anyone tell me how I can get the information of this variable into the nex block, that would be great.
    Thanks a lot for helping...
    Stephan

    This: public void verb (String o)                                                             
      flus = o;                                                                       
    }Is the whole verb method. That's all it does is assign the flus variable. This:{               
    HashMap words = new HashMap();   
    // etcIs an initializer, which runs as soon as the object is created, ie before the verb method.

  • 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/

  • Passing values to session variables from another application

    Hi,
    From an external application we are passing username and password for accessing the OBIEE Dashboard.In the url call we are passing NQUser and NQPassword. This is working fine.
    To setup data level security we need to pass region id list also as request object. Then we can filter the tables by the value in the region id list for that user. If we use external table to pass the home_id list then the application is working fine by setting up row-wise init block. But we need request object from an external application to send the list. How can we accept the list from OBIEE RPD?
    In the documentation it mentions about session variables - non system. But it requires an init block. How can we create a variable that accepts the values when user logins just like NQUser and NQPassword.
    Please suggest.
    Thanks.

    Try this ...
    http://oraclebizint.wordpress.com/2007/07/30/customizing-obi-ee-%E2%80%93-go-url-parameters/
    In this blog entry you'll find at the bottom ...
    Hello, Can you please explain how to pass parameter values in the url. For example, I want to run an answers query and pass into the url something like this: &Region=West
    Venkatakrishnan J Says:
    August 22, 2007 at 7:36 am
    Yes, this absolutely possible. You can get the details from the Web Services guide since it has all the necessary examples and more explanation. Thats why i did not include it in the blog. You can get it from page 213 of the Docs http://download.oracle.com/docs/cd/B40078_02/doc/bi.1013/b31766.pdf

  • Struts-JSP : how to use session variable?

    Hi,
    i'm new to both struts and JSP and have a doubt here -
    I'm creating a web application in which a user logs in.
    I need to access this user's userid (id name with which he logs in) in my action classes. how can i do this ?
    please help !
    Thanks in advance,
    susen

    // set session variable
    session.setAttribute("value","hello world");
    // retrieve session variable
    HttpSession session = request.getSession(false);
    String variable = (String) session.getAttribute("value");
    variable will have "hello world"
    Edited by: abel on May 12, 2008 4:52 AM

  • How to store session variables in drop down menu (and radiobutton/checkbox)

    How am I going to store session variables in the drop down menu, radio button, checkbox.
    In text area, I do like below:
    <input type="text" name="membershipno" size="5" maxlength="50" value="<%=((session.getValue("Smembershipno")!=null)?session.getValue("Smembershipno"):"") %>">
    Any idea?

    Hi jeffkyt79, I could have answered this on Expert's Exchange. But I suppose it would be hard as the site is down right now :-(
    Here is sample code for the form:
    <form action="" name="form1">
    <input type="text" name="field1" value="<%
    if (session.getAttribute("field1")!=null) {
    out.println(session.getAttribute("field1"));
    } %>"><br>
    <input type="text" name="field2" value="<%
    if (session.getAttribute("field2")!=null) {
    out.println(session.getAttribute("field2"));
    } %>"><br>
    <input type="text" name="field3" value="<%
    if (session.getAttribute("field3")!=null) {
    out.println(session.getAttribute("field3"));
    } %>"><br>
    <input type="checkbox" name="check1" value="tick"<% if (session.getAttribute("check1")!=null) out.println(" checked"); %>><br>
    <% String selRadio=(session.getAttribute("r1")!=null)?(String)session.getAttribute("r1"):""; %>
    <input type="radio" name="r1" value="yesdot"<% if (selRadio.equals("yesdot")) {out.println(" checked");} %>>
    <input type="radio" name="r1" value="nodot"<% if (selRadio.equals("nodot")) {out.println(" checked");} %>><br>
    <select name="sel">
    <% String selOption=(session.getAttribute("sel")!=null)?(String)session.getAttribute("sel"):""; %>
    <option value="option1"<% if (selOption.equals("option1")) {out.println(" selected");} %>>OPTION 1
    <option value="option2"<% if (selOption.equals("option2")) {out.println(" selected");} %>>OPTION 2
         <option value="option3"<% if (selOption.equals("option3")) {out.println(" selected");} %>>OPTION 3
    </select>
    </form>
    And here's the revised javascript function to put in form1.jsp:
    function newWin() {
    f=document.form1.elements;
    str="?";
    mypage="test2.jsp"; // I've hardcoded the url for testing but you can fix this
    for (i=0;i<f.length;i++) {
    if (f.type=="text") {
    if (f[i].value!="") {
    str=str+f[i].name+"="+f[i].value+"&";
              continue;
         if (f[i].type=="checkbox"||f[i].type=="radio") {
         if (f[i].checked) {
         str=str+f[i].name+"="+f[i].value+"&";
         if (f[i].type=="select-one") {
         str=str+f[i].name+"="+f[i].options[f[i].selectedIndex].value+"&";
    str=str.substr(0,str.length-1);
    // now open the popup
    mypage+=str;
    win=window.open(mypage, 'myname'); // I've left out the winprops but you can fix this
    If you can ask any more questions, could you do it on EE (if possible!!). I know this works because I've tested it.

  • How to retrieve sessions variables in JSP

    hi,
    I am trying to retrieve session variable from servlet to JSP.
    In the servlet i am retrieving employeenames from database and storing them in a ArrayList variable then i am setting this variable into the session.
    When retrieving the session in the jsp it displays as [empname1, empname2].
    Please help how to retrieve them
    Thanks in Advance,
    sha

    At the servlet:
    ArrayList<String> employeeNames = new ArrayList<String>();
    employeenames.add(blahBlahblah);
    session.setAttribute("eNames", employeeNames);
    At the JSP:
    ArrayList<String> names = (ArrayList<String>) session.getAttribute("eNames");
    for (String nom : names) {
    do something with the name stored in String variable nom...
    }

  • How to replace one variable with another in large number of queries

    Hello guys!
    I have this situation: our company needs to use one variable instead of another for certain amount of queries.
    Is there some way to automatically replace one variable with another for a certain characteristic in big number of queries ( like 150 - 200 ) ? Doing this manually would take lots of time)
    Apreciate your help!

    you could try (at your own risk) the following:
    1. search the technical id (ELTUID) of your variable in table RSZELTDIR
    2. see where this variable is used in table RSZELTXREF (by filling RSZELTDIR-ELTUIID in RSZELTXREF-TELTUID)
    3. add similar entries for your new variable
    4. delete the entries for the old variable (they're part of the key, so you can't simply "change" them)

  • How to declare global variables using another global variable in ODI

    I am declaring a gloabal variable using another global variable.
    say for example:
    I have a global variable empid.
    I am decalaring another global variable empname in refreshing tab of global variables and the select statment is
    select empname from emp where empno = #GLOBAL.empid -------if i write like this i am getting error as invalid character.
    select empname from emp where empno = '#GLOBAL.empid'-------if i write like this i am getting error as invalid number.
    I have kept the datatype as numeric and action as non persistent
    Please help
    Thank you in advance.

    Hi,
    You cant test/refresh empname standalone.
    You need to create a new package drag and drop both variables and make them as refresh variable and execute that package and test.
    Flow,
    empid----> empname
    Thanks,
    Guru

  • How to get session variable value in conditional formatting

    I am trying to format my column according to value of a session variable. Normally when comparing to a static value I select value from add button and write the value. What I want is to be able to do this using a session variable. I select variable presentation and as the variable expression I tried MYDAY, NQ_SESSION.MYDAY, VALUEOF(NQ_SESSION.MYDAY), VALUEOF(MYDAY) but nothing works. By the way it is a date value, I don't know it makes any difference
    Any help would be appriciated

    I am surprised that it is not possible to select a session variable when you want to use conditional formatting. Apparently you can only base conditional formatting on presentation variable or values within a column.
    As a workaround you can create an extra column in your request and use a CASE WHEN statement, where you compare the value of the date with the session variable. Then you can base your conditional formatting on that column.
    Regards,
    Stijn
    Message was edited by:
    Stijn Gabriels

  • How to store session variable in portal?

    Hi All,
    I have many webdynpro applications in portal. One of them displays list of project numbers read from backend. If user selects a project number and clicks OK button on that view, the same project number should be made available in all the other applications.
    For this purpose, I want to store the project number in the session.
    Is it necessary to create a portal service to store the session variable?
    Thanks and Regards,
    Deepti

    Hi Deepti,
      Through portal eventing you can pass data in the String format from Web Dynpro application to Portal application using WDPortalEventing API. Please check it.
    Regards,
    Ganga.

Maybe you are looking for

  • Problem in starting Sun Java System Application Server

    Hi, Recently I installed SJSAS 8.1 on my machine (Windoes 2000), before that I was working on SJSAS8.0 and it was working file. But with 8.1 when I try to "Start Default Server". I get the following error on the console: Starting Domain domain1, plea

  • TNS-12560: TNS:protocol adapter error on Oracle Enterprise Linux

    hi, I am getting - TNS-12560: TNS:protocol adapter error when I try to connect the Db installed on Oracle Enterprise Linux from other machines. I made all the .bash_profile changes and created one shared listener also to check whether there is any pr

  • MacBook Pro w/RD: Strange whining noise!!!

    My Mac recently got serviced at an Apple Store - and there seems to be a problem. When I power it on, and while I am using it, there seems to be a strange whining noise coming from the upper-right hand side (when looking down at the keyboard). Near t

  • Can't get information on phone calls

    Need help. I tried restoring didnt work. If anyone can help

  • Spc control chart not showing UCL CL or LCL

    Hi people, I have an spc control chart within my app.  However for some reason the UCL, CL and LCL aren't showing on my graph. A brief background: This is an app for people entering measurement data into several numberboxes the average of which goes