OBIEE | Using Dynamic Session Variable in Physical Layer

Hi All,
Any idea if we can use Dynamic Session Variables (I think they are also called Repository Variables) in our physical layer. I basically need to set the value of this variable from dashboard when a link is clicked, and then use this in my SELECT query at physical layer so that OBIEE does not pull all the data from the database tables.
Regards
Adeel Javed
Edited by: user10642426 on Apr 6, 2009 2:03 AM

Christian,
Thanks for the quick response, ok we have actually moved to a different solution now, we are actually using Direct Database Request because one of our reports is supposed to be accessing direct transactional system i.e. for this report we are using OBIEE as a reporting tool. We are able to do that and even create links between different reports i.e. based on prompt in Report A filter Report B, but the scenario now is that we need to set a presentation variable from Report A when a navigation link gets clicked, because so far according to our knowledge direct SQL only allows presentation variables in its WHERE clause. So, any ideas how can we set a presentation variable when a navigation link is clicked. Thanks.
Regards
Adeel Javed
Edited by: adeeljaved on Apr 6, 2009 11:43 PM

Similar Messages

  • Session Variable in Physical Layer

    Hi All,
    I am trying to use session variable in Physical layer i mean in select statement like select region,revenue,year from ABC where siteid ='VALUEOF(NQ_SESSION."siteid")' but it throws a warning saying that
    WARNINGS:
    GLOBAL:
    The repository variable, NQ_SESSION."siteid", has no value definition.
    even though I gave value is zero for not exisiting site in init block but it is still throws same warning.
    is there anything i am doing wrong.Please can you give ur valuable suggestions .
    Thanks for ur replies!!!!!!!!1

    Thanks for replying!!!!!!!
    I checked it.There are no values in it even though i forced some dummy values(i.e it's everthing plain).I dont whether we can pass session variables values in Physical Layer or they can be only used in BMM Layer.
    This is what i did
    select 'siteid',site_id from xyz as a where upper(a.loginname)=upper(:user) union select 'siteid',0 from dual and then pass the values in physical layer
    select e,r,t,,u,i from ABC where siteid ='VALUEOF(NQ_SESSION.siteid){Note:Its just example don't think about column names or tables names}
    Please correct if i am doing anything wrong.
    Thanks

  • How to set a lable as the dynamic session variable ?

    I have created a dynamic session variable in admin tool and then I want to create a prompt in dashboard and set label to use this session variable
    I try to use the @{variable} or @{system.variable} in the label text ,but it is not work ,so what is the correct way or does the obiee not support to do like this?

    thx, for responded
    but I have read a topic said if left the label text empty the reference a presentation variable , then it can work , you can see it below:
    http://obiee101.blogspot.in/2009/04/obiee-multi-lingual-prompt.html

  • Use of Session Variable in Dashboard Page XML

    Hi All,
    Can we use a Session variable in the Dashboard Page XML?
    My Requirement is,
    There are 1000+ users, each user will have access to same dashboard. But a different report in the same dashboard.
    So we want to Save individual user reports in the location /users/LOGIN_NAME/Financials/ABC
    and dynamically change the Dashboard Page XML, to accept Session Variable VALUEOF(NQ_SESSION.USER) in place of LOGIN_NAME.
    So that for each user, they will see only their report.

    On the face of it, Session is ideal for this, however this is SharePoint and the obvious isn't always the best. 
    You'd need to do the calculation about memory usage and number of concurrent users to ensure it really is a viable option in Production. 
    If it isn't viable, or wouldn't scale to possible future usage what would you do? Then you need to ask if it's really necessary to move between pages? If the user needs to move through a dialog for example, that could be hosted on a single page which might
    have different controls or sections made visible as the user progressed through the use case.
    Passing data between pages in SharePoint is a lot more difficult than it should be. Sometimes it's best to stay put, and certainly safer than using Session if you're really not sure if Session will stop your solution from scaling.
    Always remember, SharePoint might be hosted on ASP.NET but the design considerations are significantly different than if this were a pure ASP.NET application.
    w: http://www.the-north.com/sharepoint | t: @JMcAllisterCH | YouTube: http://www.youtube.com/user/JamieMcAllisterMVP

  • Unable to filter a recordset using a session  variable

    I have a volunteer application page and when the volunteer presses <Submit> their info is saved in a MySQl db table and a session variable is created containing the primary key of their record in the table, control is then passed to a "success page". The success page can access the session variable (I proved this by displaying the session variable on the success page) so my next step was to create a recordset in the success page with a filter using the session variable to select the appropriate row in the table, allowing me to display to the volunteer the info they submitted.
    I set up a test success page which displays the session variable and one field of the volunteer info. When I test this I see the session variable displayed but the corresponding volunteer info field from the recordset is not displayed.
    The volunteer application page is here www.hollisterairshow.com/volunteerapp.php and the successpage is here www.hollisterairshow.com/thanksvol.php
    The code that creates the session variable in the volunteer application page is shown below
    $_SESSION['volunteer_id'] = mysql_insert_id();
    The code to display the session variable in the success page is shown below
    <?php  echo $_SESSION['volunteer_id']; ?>
    The code to display the volunteer info is shown below
    <h1> Thank You <?php echo $row_rsVolunteerApp['firstname']; ?>!! </h1>
    The recordset definition is shown below
    The success page test result is shown below, as you can see the volunteer's first name is not displayed immediately after the "Thank you" message but the session variable holding the correct primary key (41) is shown correctly.
    Does anyone have an idea of what I'm doing wrong?
    Thanks
    Tony

    Where did you put session_start()? It needs to be before the variable is accessed. It's obviously before the line that displays the value in your page, but is it before the SQL query is generated?
    Also, have you checked in phpMyAdmin to see whether volunteernumber 41 has any values in the database?

  • Standard for the use of session variable in webpart code.

    Hi,
    Why we should avoid using of session variables while writing code?
    Is it not a standard?
    Thanks,
    Akhilesh Rao
    Akhilesh Rao

    On the face of it, Session is ideal for this, however this is SharePoint and the obvious isn't always the best. 
    You'd need to do the calculation about memory usage and number of concurrent users to ensure it really is a viable option in Production. 
    If it isn't viable, or wouldn't scale to possible future usage what would you do? Then you need to ask if it's really necessary to move between pages? If the user needs to move through a dialog for example, that could be hosted on a single page which might
    have different controls or sections made visible as the user progressed through the use case.
    Passing data between pages in SharePoint is a lot more difficult than it should be. Sometimes it's best to stay put, and certainly safer than using Session if you're really not sure if Session will stop your solution from scaling.
    Always remember, SharePoint might be hosted on ASP.NET but the design considerations are significantly different than if this were a pure ASP.NET application.
    w: http://www.the-north.com/sharepoint | t: @JMcAllisterCH | YouTube: http://www.youtube.com/user/JamieMcAllisterMVP

  • How to use a session variable in Conditional Format?

    Hi Gurus,
    I created a session variable , called Actual_date,
    using the following SELECT:
    SELECT SYSDATE FROM DUAL
    In a report title the following expression worked fine:
    @{biServer.variables['NQ_SESSION.Actual_date']}
    I red in a reply in this forum, under the
    "Oracle BI EE Variables Overview"
    that we can use the above format in Cond.Format.
    However I got an error:
    "The value entered msut date and Time..."
    Any tips?
    Thanks
    Laszlo

    It's because when you fired
    SELECT SYSDATE FROM DUALYour variable have a LONGVARCHAR type (if I remember)
    Check here how to find the data type.
    http://gerardnico.com/wiki/dat/obiee/obi_server_variable_find_value
    If you just need to get the current date, you can try the system presentation variable current time as :
    @{system.currentTime} Good luck
    Nico

  • Use of session variable to retrieve user language

    Hi,
    I'm converting some ASP code to JSP and I'm having a problem concerning session variables, in ASP I had something like this
    (first.asp)
    <td align="center" width=145px><%=getLabel(1)%>
    and in second.asp
    dim Label(3,2)
    function GetLabel(ndx)
    GetLabel = Label(ndx, Session("Language"))
    end function
    clang_PT = 1 ' Portuguese
    clang_EN = 2 ' English
    Label(0,clang_PT) = "primeira"
    Label(1,clang_PT) = "Segunda"
    Label(0,clang_PT) = "first"
    Label(1,clang_PT) = "second"
    when trying to do the same thing in JSP
    (first.jsp)
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%@include file="labels.jsp"%>
    <!DOCTYPE HTML PUBLIC "-//w3c//dtd html 4.0 transitional//en">
    <%if (session.isNew()) {
    session.setAttribute("Language","1");
    }%>
    <%= getLabel(1)%>
    (labels.jsp)
    <%@ page language="java" import="java.util.*"%>
    <%@page pageEncoding="UTF-8"%>
    <%! String getlabel(int ndx){
    return label[ndx][session.getAttribute("Language")];
    String[][] label = new String[2][2];
    %>
    <%
    int clang_PT = 0; // Portugu�s
    int clang_EN = 1; // Ingl�s
    label[0][clang_PT] = "primeira";
    label[1][clang_PT] = "segunda";
    label[0][clang_EN] = "first";
    label[1][clang_EN] = "second";
    %>
    I get
    cannot find symbol symbol : variable session location: class org.apache.jsp.experiencia_jsp return label[ndx][session.getAttribute("Language")];
    ^
    and
    cannot find symbol : method getLabel(int)
    location: class org.apache.jsp.experiencia_jsp
    out.print( getLabel(1));
    Should I use a bean to store this kind of info?
    thanks, V

    right...
    actually, cuz doing this:
    <%!
    String getlabel(int ndx){
    int lang = Integer.parseInt((String)session.getAttribute("Language"));
    return label[ndx][lang];
    %>
    there's no session object... that creates a method in the class separate from the main JSP method. So you need to either pass the session object in, or just pass the attribute value..
    <%!
    String getlabel(int ndx, int lang){
    return label[ndx][lang];
    %>
    int lang = Integer.parseInt((String)session.getAttribute("Language"));
    String lable = getLabel(ndx, lang);

  • Prevent user from setting a parameter in url. Always use http session variable

    In my xsql page I want to prevent a user from seeing data that he is not allowed to see. I am thinking of implementing this by reading a http session variable (like userid=xxx) to be used in my query. I want to be absolutely sure that the userid variable cannot be set manually by the user, for instance by manipulating the url (like: mypage.xsql?userid=123). How can I do this?

    Sorry guys, already found it. Thanks to a reply from our lead-guru Muench on another post in this forum. Look here for the answer:
    http://download-west.oracle.com/otndoc/oracle9i/901_doc/appdev.901/a88894/adx10xsq.htm#1023490
    Search for "Understanding the Different Kinds of Parameters".

  • Use of session variables disappeared

    Hi - I have a really old CF site that has worked perfectly all these years.
    Sometime over the past 7 days, my all of my session variables have ceased to work.
    These session variables appear on the pages where I set them up, but the minute I transfer to a new page, they are completely gone. They do not appear in the debug information at all.
    I think that there has been some change in CF Server 8, but my system administrator says that he did not change any settings. (If he had, what would it be? I don't have admin access.)
    Like I said, they worked perfectly until very recently and luckily, I don't use a load of them.
    If push comes to shove, I can use cookies, but I really don't want to sit through an evening of debugging.
    What do you think went wrong?
    Help!

    Well - thank U. My system admin said he did not touch a thing, and furthermore, my test works well for him.
    Here is my test:
    http://www.littleviews.com/test/test_1.cfm
    Page 2 should fail, or at least it does for me (I live on the East Coast in Weehawken), but it does not to him (the Milwaukee/Waukesha area in Wisconsin)
    Karen

  • Flashbuilder and Cold Fusion  (using application/session variables)

    I would like to know if anybody uses Flashbuilder with Cold Fusion?
    Since Cold Fusion has lots of different scopes of variables (application, session, client, form, url, etc...) how do you manage this in Flex/Flashbuilder?
    Are there forums or groups specifically for using Flex3/Flashbuilder with backend server side technologies such as Cold Fusion?.
    The only server side technology that I have interest in is Cold Fusion.  I've seen basic tutorials and videos using Cold Fusion CFC's and data binding with Flex.  I haven't seen or heard anything using a Cold Fusion application, session, or client variable in Flex.
    Hopefully some of you have some experience on this topic.
    Thanks

    hey popster,
    i too had this question some time ago. my entire app was built on CF with HTML before i started integrating Flex 3 with it. i found that i needed to create cookie variables for all my session variables i was using in order to maintain and remember who the user was in my CFC calls. i also found that after i compiled a flex app, i changed the .html to .cfm (the file that loads the compiled SWF file). by doing this i was able to pass CF session variables into the flex app and you can refer to these anywhere in Flex by using Application.application.parameters.{variable name here} 
    add the CF variable in the FlashVars line to pass it into Flex (see the last line of code). this will create a variable (in my case i'm passing session.employeenumber). then in your flex app you can reference it by using Application.application.parameters.emplid:
    AC_FL_RunContent(
       "src", "Request",
       "width", "100%",
       "height", "87%",
       "align", "middle",
       "id", "Request",
       "quality", "high",
       "bgcolor", "#869ca7",
       "name", "Request",
       "allowScriptAccess","sameDomain",
       "type", "application/x-shockwave-flash",
       "pluginspage", "http://www.adobe.com/go/getflashplayer",
       "wmode","transparent",
       "FlashVars","emplid=<cfoutput>#session.employeenumber#</cfoutput"
    A little trick I learned (does Adobe really expect us to re-engineer how our apps have been working by no longer using sessions for Flex?). Then in your CFCs if you also create cookies for every session variable you can maintain the variables based on user login. HOPE THIS HELPS!
    -Matt

  • Creating filtered view on the physical layer ussing session variable USER

    Hi:
    I´m creating a view on the physical layer, the view needs to be created dynamically. So depending on the user (using the session variable USER) the view is created with the data a particular user is able to see.
    Fisrt I imported the table and changed it´s properties to be created through a "Select Statement" so i don´t needed to change the mapping on the bussiness model layer.
    The consistency check was OK but i´m not able to see data in answers, even using the Administrator user. Have anyone tried to do this? Here is my query.
    Thanks
    A Garcia
    Select * from D_ESTRUCTURA_RH2 where Region_ID
    IN
    select distinct a.REGION_ID from APP_INDPERSONAL_DM.D_ESTRUCTURA_RH2 a
    inner join (
    select distinct b.REGION_ID from APP_INDPERSONAL_DM.D_ESTRUCTURA_RH2 b
    where exists (select 1 from APP_INDPERSONAL_DM.Autorizacion a, usuarios c
    where a.app_id = 1
    and a.usuario_id = c.Usuario_Id
    and UPPER(c.Nombre_Usuario)=UPPER(':USER')
    and a.miembro_id = 'REGION_ID'
    and a.operador = '='
    and (b.REGION_ID = (case when valor = 'Todo' then 0 else valor end) or valor='Todo'))
    ) seguridad
    on
    a. REGION_ID = seguridad.REGION_ID
    )

    whay not use the same filter in the content tab of the logical table source?
    check the physical sql sent to databse using web-admin-manage sessions-view log and see if there is any unexpected behavior. also run the same query in db and see iff you get the results in databse itself.

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

  • Can we use session variables in BI publisher's Data Model SQL Query?

    Hi Experts,
    We need to implement Data level security in BI Publisher 11g.
    In OBIEE we do so by using session variables, so just wanted to ask if we can use the same session variables in BI Publisher as well
    ie can we include the where clause in the Data Models SQL Query like
    Where ORG_ID = @{biServer.variables['NQ_SESSION.INV_ORG']}
    Let me know your views on this.
    PS: We are implementing EBS r12 security in BI Publisher.
    Thanks

    Read this -> OBIEE 11g: Error: "[nQSError: 23006] The session variable, NQ_SESSION.LAN_INT, has no value definition." when Creating a SQL Query using the session variable NQ_SESSION.LAN_INT in BI Publisher [ID 1511676.1]
    Follow the ER - BUG:13607750 - NEED TO BE ABLE TO SET A SESSION VARIABLE IN OBIEE AND USE IT IN BI PUBLISHER
    HTH,
    SVS

  • Create a Link using Dynamic Text and Capture Variable

    I am building a dynamic website using Dreamweaver CS5 with Coldfusion 9
    Currently I have created a dynamic text table. The table is created by querying the Invoice table and displays the all the customers Invoices. The columns Include Invoice #, Date, Amount Paid, BalanceRemaining, Due Date. So basically lists all the invoices I have applied to the unique customer. It is pulled up using a session variable I created from the login page.
    My question is this I want to make the "Invoice #" linked so when you click on it it goes to a new page and performs a new query which retrieves infro related to that specific invoice such as Services Rendered, Service Description, Date, Price, Total. I was able to create a link to the Invoice # but I am stuck trying to figure out how to capture the Unique Invoice # and apply it to the new query. Is this possible if so how?
    Thanks for your help!

    Now keep in mind I am speaking strictly from a web and SQL standpoint as I have no experience with coldfusion.
    If you are able to create the link to the Invoice, I am perceiving this as the following:
    Invoice
    Links to
    #123
    page.php?invoice=123
    #345
    page.php?invoice=345
    If your page is setup like that then you already have the data stored in the browser request with the GET method.  In PHP the equivalent is the $_GET array.  I am assuming ColdFusion has a similar array to work with forms.  Then on your following page you obviously need to check that the visitor came from the prior page with the proper permissions to ensure that someone doesn't get the address page.php?invoice=### and just guesses through and views all invoices if they are not supposed to.  Then your query would look something like the following:
    SELECT * FROM invoice_table WHERE invoice_number = $_GET['invoice']
    Remember this in written in PHP so yours should be a similar equivalent.
    Hopefully this helps a little to get you going in the right direction.

Maybe you are looking for