Issue with session variable

Hi,
I'm trying to setup a session variable to filter an Answer query based on the user login name. I've created the following
- A database table that contains a user name and its related filter (Entity)
- An initialization block for the session variable to issue the following sql: select Entity from table where user_name = ':USER'
- Created a target session variable called CURR_ENTITY as the target and assign a default value as 'No entity'.
- Filter my Answer query to use the session variable CURR_ENTITY
After restart of BI server and Presentation services and opening the report, CURR_ENTITY is always set to the default value. I've checked NQQuery,.log and looks like the initialization block was not returning any rows.
Any ideas on how to get around this issue? Thanks.
Regards,
Gerd

Hi gerd,
select Entity from table where user_name = ':USER'Check if this query is returning values in the backend DB.If so it is returning then it should work fine in session variable.
After defining the target variable CURR_ENTITY and test it in the screen.That shows you is it picking all the values or a single defaulted value.
If its showing all values then re-check your block once again.
(OR)
In the target variable instead of variable define row-wise initialization (i mean check it) and change the SQL in the variable to this
select 'CURR_ENTITY',Entity from table where user_name = ':USER'
and test it so you can use it in answers .....it should work with what is required.
hope answered the question.
Cheers,
KK

Similar Messages

  • Issue with Session variables

    Hi SDNers,
    I have a few portal components on the portal page that save data directly to the http session as well as some data is stored in the bean and the bean is stored in the component's session.
    When the user logs in and views the portal page, the user is able to see the data correctly as all the values exist in the session.
    The portal components contain navigation links via EPCM to other portal pages.
    If the user clicks on a navigation link to a portal page which contains portal component iViews the session values in the session are retained.
    However, if the user clicks on a link to navigate to a portal page that contains ESS applications or the standard UWL iView and once it is loaded he/she clicks on any TLN entry, then the session values and the bean get nullified, thus resulting in null session values.
    I am a bit confused as to why does this behaviour only happen when pages with ESS apps or Std. UWL iview are loaded and any TLN entry is clicked.
    Any help would be apprciated.
    Regards,
    Melwyn

    Any solutions?
    Regards,
    Melwyn

  • BW 3.5 - Issue with formula variable with replacement path

    Dear experts,
    I'm facing an issue with formula variable with replacement path.
    Just to clarify, I know replacement paths is raising a lot of questions but I've been using this functionnality extensively in the past, both in 7.0 and 3.5, so I'm not looking for basic information about how to use it.
    I'm trying to setup a simple report that would show total values per plant of Purchase Order < 100 €
    To do so I've setup a calculated key figure as follow:
    VAR1 * ("PO value" < 100 ) * "PO value"
    VAR1 is a formula variable with replacement path on 'purchase order' and value attribute 'constant =1'.
    (The report has to show values summarized by plant but should not show the detail PO by PO, so I'm not looking at a solution based on condition)
    The report as characteristic "plant" in rows and my CKF in columns.
    Now let's take an example. I have 3 POs in Plant 1:
    PO1 -> 150€
    PO2 -> 90€
    PO3 -> 80€
    Because of the variable with replacement path, the result in my query should be:
    plant1 = 170 (even though characteristic "purchase order" is not in my rows, system should evaluate PO one by one and return values only for those two that are below 100).
    But the result coming is 320, which is wrong.
    I've done the same report on many other 3.5 systems and it worked perfectly, and I am not able to get proper support from SAP OSS who keep saying that this functionnality is not ready in 3.5 (although I've provided screenshot of this working on another 3.5 system!!! how frustrating...)
    They have also pointed to problems of Before and After aggregation but that has absolutely no impact. Once again, the scenario is working perfectly on other 3.5 systems with the same query design, so i'm sure it has nothing to do with Query Designer options.
    Would anyone have ever come to an equivalenet problem? I'm wondering whether the DB itself could not play a role in the variable with ref  characteristic 'constant =1' ...
    Any though is welcome!
    thanks

    Hi,
    The text variable is replaced when the exact date is clear for this key figure column according to the restriction.
    To achive this, please make sure that either the variable is directly restricted in the key figure selection, or that the date characteristic is in drilldown.
    Regards,
    Patricia

  • Filter recordset with session variable

    This has never happened to me before, but for some reason, my
    recordset that drives a dynamic table won't filter results based on
    a session variable. I know session variables are working because I
    have the session variable echo on the page (dragged-n-dropped my
    session variable from the Bindings panel to my page), and that
    works fine. So why can't I filter my recordset with the same
    session variable??? What's going on?
    PS: I've attached my result page's code to this
    message.

    Gabe the Animator wrote:
    > <?php require_once('Connections/sales.php'); ?>
    > <?php
    > if (!function_exists("GetSQLValueString")) {
    > function GetSQLValueString($theValue, $theType,
    $theDefinedValue = "",
    > $theNotDefinedValue = "")
    > {
    > $theValue = get_magic_quotes_gpc() ?
    stripslashes($theValue) : $theValue;
    >
    > $theValue = function_exists("mysql_real_escape_string")
    > mysql_real_escape_string($theValue) :
    mysql_escape_string($theValue);
    >
    > switch ($theType) {
    > case "text":
    > $theValue = ($theValue != "") ? "'" . $theValue . "'" :
    "NULL";
    > break;
    > case "long":
    > case "int":
    > $theValue = ($theValue != "") ? intval($theValue) :
    "NULL";
    > break;
    > case "double":
    > $theValue = ($theValue != "") ? "'" .
    doubleval($theValue) . "'" :
    > "NULL";
    > break;
    > case "date":
    > $theValue = ($theValue != "") ? "'" . $theValue . "'" :
    "NULL";
    > break;
    > case "defined":
    > $theValue = ($theValue != "") ? $theDefinedValue :
    $theNotDefinedValue;
    > break;
    > }
    > return $theValue;
    > }
    > }
    >
    > $colname_rsSales = "-1";
    > if (isset($_SESSION['state'])) {
    > $colname_rsSales = $_SESSION['state'];
    > }
    > mysql_select_db($database_sales, $sales);
    > $query_rsSales = sprintf("SELECT * FROM sales WHERE city
    = %s",
    > GetSQLValueString($colname_rsSales, "text"));
    > $rsSales = mysql_query($query_rsSales, $sales) or
    die(mysql_error());
    > $row_rsSales = mysql_fetch_assoc($rsSales);
    > $totalRows_rsSales = mysql_num_rows($rsSales);
    >
    > session_start(); ?>
    The issue is that PHP doesn't "work" with session values
    until the session has started, and that must be done on each page,
    and must be done in the code *above* any reference to a session
    variable. The code you posted has the session_start() after it
    tries to use the session value ito filter the recordset. So move
    this last line of code ( session_start(); ) above $colnam_rsSales =
    "-1". Better yet, use:
    if(!session_id()){
    session_start();
    To prevent some versions of PHP from generating a
    warning/notice if you've called session_start() on the page already
    and you call it again.
    Danilo Celic
    | Extending Knowledge Daily :
    http://CommunityMX.com/
    | Adobe Community Expert

  • Known Issues with Session Vars and non-IE browsers?

    Are there any known issues with non-Internet Explorer
    browsers storing or reading session variables. Or loops and
    ListGetAt functions? I'm using CF 5.
    The code works fine in IE, but not in FireFox or Netscape.
    Thanks,
    Josh

    This testing will not really address any cross domain issues, due to the content being hosted by ScormCloud.
    What I found interesting, is that in ScormCloud, using the links below, my results were opposite those that I obtained through my LMS.
    In LMS, Captivate 5 worked, Captivate 6 did not in IE8, both worked in FF
    In ScormCloud, Captivate 5 did not work in IE8, but worked in FF, and Captivate 6 did work in FF and IE8.
    Here are the links:
    captivate 5 http://cloud.scorm.com/sc/InvitationConfirmEmail?publicInvitationId=3c04f298-d0db-4d10-ab6 3-80b9aaf2890b
    captivate 6 http://cloud.scorm.com/sc/InvitationConfirmEmail?publicInvitationId=e2b05753-2f03-421a-87d 9-62b92ad199af
    Thanks for your attention, every bit of information that I can get will help.
    Thanks,
    SL

  • Trouble with session variables

    Hello, I am a user of cf for a number of years, but only
    lately as of last week have I had the opportunity to work with CF
    8.... wow the changes are quite intimidating. But none the less
    press on is my thought, so now my trouble. Thing I did was to start
    using application.cfc vs application.cfm, as it would appear that
    is how things have come to pass. So I looked around and found this
    code to set session management:
    <cfcomponent output="false" hint="Handles application
    level events.">
    <!--- Set up the application. --->
    <cfset THIS.Name = "AppCFC" />
    <cfset THIS.ApplicationTimeout = CreateTimeSpan( 0, 0, 60,
    0 ) />
    <cfset THIS.SessionManagement = true />
    <cfset THIS.SetClientCookies = false />
    <CFSET request.dsn = "wlaw" />
    </cfcomponent>
    My problem is that while I can define a session variable on a
    page that is not under the SSL cert, my session vars become
    undefined once I land on a page under SSL.
    Am I missing something? I dont recall this being a problem in
    the past. All help is appreciated.
    as to setting the var, it is done on an index page which
    calls another page in a different directory, but under the same
    server,.
    <cfset session.ref="foo">
    the only changes are that the result page or action page if
    you prefer is now under the ssl and the var becomes undefined.
    thank you in advance
    Mike Dooly

    is the object being put in session context serializable.. Also in
              other to avoid any generated classes issues delete all the classes
              whcih weblogic generates as part of deploying the application. That
              should atleast mitigate one explanation for your problem.
              Hope this helps
              ~a
              [email protected] (Gabriel Ornelas De Luna) wrote in message news:<[email protected]>...
              > Hello everyone,
              > I'm currently working with WL 6.1 and I'm having trouble with the
              > persistence of some session variables which are initially created
              > correctly on the server side, and they get lost (null) once the Web
              > clients need to access its value.
              > This is the error which is being written on a log file:
              >
              > <May 13, 2003 3:05:09 PM EDT> <Error> <HTTP Session> <Could not
              > deserialize session data
              > java.io.NotSerializableException:
              >
              > Things were woriking perfectly, but suddenly after bouncing the server
              > instance several times, in order to pick up the latest changes in my
              > classes, I started to get this error once the server tries to load the
              > jsp.
              >
              > JSP Code:
              > <%
              > Integer businessID = (Integer) session.getAttribute("business_id" );
              > Util.isCapitolBusiness(businessID.intValue())
              > %>
              >
              > I appreciate your help.
              > Regards.
              > g.
              

  • Terminal issues with environmental variables

    I am having an issue with persisting environmental variables during a session. I am running an app that requires the sequential running of 3 scripts setenv.sh, build.sh, run.sh.
    The first script sets variables that are being used by the other scripts. The script just contains lines like
    "export ADVISOR_HOME=/Applications/Blaze/Advisor65;"
    if i add echo the variables name in the script they are set, but immediately after or with env they are gone.
    From my understanding (not much) these should persist as long as the window is open. Is there any setting that is being set in OS X that is sandboxing scripts? It would seem to be security-minded but is causing problems.
    Also is there any way to temporarily disable the requirement to prefix a command call with ./ in os x. Many of the included scripts are calling methods in the same directory and I am having to alter a lot of scripts to include ./
    Thanks in advance,
    walter

    walter deane wrote:
    I am having an issue with persisting environmental variables during a session. I am running an app that requires the sequential running of 3 scripts setenv.sh, build.sh, run.sh.
    The first script sets variables that are being used by the other scripts. The script just contains lines like
    "export ADVISOR_HOME=/Applications/Blaze/Advisor65;"
    if i add echo the variables name in the script they are set, but immediately after or with env they are gone.
    Do you mean you echo them from within the script and then they are gone after the script ends? That would be normal. If you want them to persist through the other scripts, you could combine the scripts. The problem is that you're setting them in one process and expecting them to persist in another process. Unless the second is a child of the first, that won't work. I think it would work if you executed the second two scripts from within the first script because they would then be children of the first process. Does that make sense? I'm not sure of the correct terminology here and I can't draw a tree which is what I want to do! Another option might be to source setenv.sh rather than running it (i.e. wouldn't need to be executable) - the same way the shell does when starting up, I think.
    From my understanding (not much) these should persist as long as the window is open.
    I don't think it has anything to do with windows. It is just when the process exits. If you set such variables at the command line, they'll persist until the window closes because they'll persist until the process exits which is usually when the window closes. At least, in the simplest cases. But it isn't the window staying open or not that's important. It's that everything else done in the window happens to inherit the environment from the parent process. In truth, this often isn't the case anyway, but I expect that's the source of the misunderstanding.
    Is there any setting that is being set in OS X that is sandboxing scripts? It would seem to be security-minded but is causing problems.
    Nothing special that I know of. There is stuff for something like this in Leopard but you'd have to enable it and I'm not sure it applies here.
    Also is there any way to temporarily disable the requirement to prefix a command call with ./ in os x. Many of the included scripts are calling methods in the same directory and I am having to alter a lot of scripts to include ./
    You can do this but it is extremely insecure. Essentially, you can add the current directory to PATH. (PATH=$PATH:./; export PATH) It would be much, much better - much, much safer - to edit the scripts. Can you not use sed to edit them? If there is some sort of pattern, there's no need to do it by hand.
    If this is an application you plan to share, you should certainly not consider changing PATH in this way unless you are aiming to produce an application with maximum destructive potential! If you don't plan to share, of course, it is your call!
    - cfr

  • Issues with Shared Variables in Systems Running for Extended Periods of Time

    I am designing a large SCADA system using LabVIEW DSC and cRIOs. My plan is to use shared variables to communicate the majority of the information across my network (much like "tags" in a normal SCADA system).
    I'm wondering if anyone has experienced issues (connection failures, etc...) with shared variables running on systems for months (both real-time and windows based PCs) without the cRIO or PC being restarted/redeploying the variables. What is the stability of the Shared Variable Engine over extended periods of time?
    Thank you for the input.
    --CLD--
    LV 6.1, 8.6.1, 2011 SP1, 2012 SP1

    I have a system with 2 cRIO's each with Ethercat extension chassis.  Each cRIO hosts ~100 NSV's and is running the scan engine at 40 Hz.
    Each cRIO is coupled to a HMI that has front panel control bindings to NSV's hosted on the cRIO as well as a windows hosted mirror library (used for citadel db logging) that is also bound to the cRIO NSV library.  The cRIO's have monay months of contiguous run time without reboot and I closely monitor cpu and memory usage and also rt performance metrics and will log faults if there are any such events.  I also use NSV's for messaging from the HMI to the cRIO for such things as setting zero offset values and deploying configuration parameters.  My overall findings are that the SV engine and the PSP are stable and efficient (especially NSV<->NSV and NSV<->HMI binding)

  • A simple app to secure coldfusion pages - Running into an issue with Session

    Hello, I am testing out how to protect pages in coldfusion and have run into an issue when attempting to create a process by which users can log out.
    Essentially, I have three pages:
    Page A - The form that submits to Page B
    Page B - That checks the form.username and form.password against a database (works fine)
    Page C - Logout page (Which is where I am having an issue).
    Page C throws a "variable Session is undefined" error
    Here is the code on Page C:
    <cfset StructClear(Session)>
    <cflocation url="index.cfm">
    Here is the code on Page B:
    <cfif NOT IsDefined ("form.username")>
    <cflocation url="index.cfm" addtoken="No">
    </cfif>
    <cfquery name="test" datasource="cfdb">
    SELECT * FROM USERS
    WHERE USERNAME = '#FORM.username#'
    AND PASSWORD = '#FORM.password#'
    </cfquery>
    <!---<CFSET Session.LoggedIn = "1">
    <CFSET Session.FirstName = "#test.FirstName#">--->
    <CFIF test.RecordCount IS 0>
    <cflocation url="index.cfm" addtoken="No">
    <CFSET StructClear(Session)>
    <cfelse>
    <CFSET Session.LoggedIn = "1">
    <!---<cflocation url="test.cfm" addtoken="No">--->
    </cfif>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <p><a href="logout.cfm">Log Out</a></p>
    <p> </p>
    <p> </p>
    <p><br>
      This content is protected.
    </p>
    </body>
    </html>
    As you can see, nothing fancy
    Now, I thought that the Session variable could be accessed by any page within a given browser instance, but I am obviously wrong.
    What do I need to do for Page C (my logout page to be able to access the session variable).
    Any guidance is greatly appreciated!

    1.
    “Variable Session is undefined” error comes up when you try to manipulate a session variable which does not exist, as at that point in time. To take care of possible empty session structures, it is good practice to check first if your session is defined.
    So you will have something like:
    <cfif isDefined("session")>
    <cfset StructClear(Session) />
    <cfelse>
    <cflocation url="index.cfm">
    </cfif>
    2.
    To enable you access your session variables from any page in your application, you need to enable session management in your Application.cfm or Application.cfc.
    cfm   <cfapplication sessionmanagement="Yes" />
    cfc        <cfcomponent>
    <cfset THIS.SessionManagement = "Yes" />
    </cfcomponent>
    Reference…http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24 -7c48.html

  • Issue with Default Variable in WAD after Java Patch 7.01.7.31

    Hello all,
    I'm running into an issue with the Web Application Designer Template execution for a particular default variable. This started occuring after Java Patch 7.01.7.31 we had implented over the weekend.
    The issue is when Executing the WAD Template, we have a selection screen with a variable with default values assigned to it. When leaving the default values and hitting Ok to execute  through the screen does not register and stays as is and I get a message at the top with the following: Characteristic Prob % Number has no master data for "1.00" or you do not have authorization.
    This only seems to occur for this default variable on info object Prob % Number, the other default variables seem to work fine. Also another note when clearing out the values it returns data and executes through. The value 1.00 is also a valid value in the cube and also in the output display. If we run this report in the BEx analyzer, the selection screen executes through with the default variable perfectly fine, this is only an issue with the Web Application Designer Template.
    Has anyone ran into this? I've searched and have not found any notes as of yet.
    Thank you,
    -Andy

    Dear Andy,
    Please raise this to SAP, seems like a strange problem this needs to be addressed by OSS note only.
    Close this thread once you get a solution.
    Regards.
    Den

  • Issue with declaring variable

    I am developing a multiuser application in flash, using smartfox server and as 2.0, but i am having an issue with defining/declaring a variable/object/array, and then accessing it. I am attempting to define "curMap" (whether it be a variable, array, object, whatever works) within the following function, as the returned array from the server, "resObj". This works fine as long as i only call up "curMap" WITHIN this function(as you see in the  line :  r_txt.text = curMap;)  however whenever I try to call up "curMap" on the frame coding, outside the function, it comes back as undefined, or typically nothing.  Any Ideas as to how to properly do/assign this? I have tried various things(such as _root., _global, or defining the var "curMap" outside the function) with no luck.
    Here is my Code:
    smartfox.onExtensionResponse = function(resObj:Object, type:String)
            if (type == "xml")
                    if (resObj._cmd == "getMap")
                        curMap = resObj.db[0];
                        r_txt.text = curMap;
                    }else if (resObj._cmd == "getSurr"){
                     surrMap = resObj.db;
                     b_txt.text = surrMap[0];
    thanks

    ahhh! yup that fixes it, thanks!

  • Issue With OLAP Variable

    HI all,
    we have an issue with the OLAP variable. One of the  SAP olap variable(0P-perf1) is processed  as Authorisation. where it should be sap exit. When we try to change at the BEx analyzer it was in disabled status.
    My question here are :
    1) How we can change the processing type?

    Hi,
    Pls refer link
    creation of OLAP  Variable
    http://help.sap.com/saphelp_nw04/helpdata/en/f1/0a55ece09411d2acb90000e829fbfe/frameset.htm
    It may help you.
    Thanks
    Edited by: npathak on Aug 4, 2010 4:09 PM

  • Issue with substitution variable with @MDSHIFT in BR in Calc Manager

    Hi Experts,
    We have a BR in EAS which is working fine.
    and exported to Calcmanager, now while validation it is giving error "@BaseScenario" is not found.
    the code is
    @MDSHIFT("LFLSalesIncVAT_GBP_C_DHP"->&BaseScenario->"Final"->"CD_FinalPlanPL",-1,"Year",,1,"Period",);
    if i hard code it like @MDSHIFT("LFLSalesIncVAT_GBP_C_DHP"->"P7PP"->"Final"->"CD_FinalPlanPL",-1,"Year",,1,"Period",); working fine.
    is there any limitation with calc manger and substitution variables?
    Thanks
    GP

    There seems to be many issues with validations in calc manager, does the rule run if you dont validate.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Row level security with session variables, not a best practice?

    Hello,
    We are about to implement row level security in our BI project using OBIEE, and the solution we found most convenient for our requirement was to use session variables with initalization blocks.
    The problem is that this method is listed as a "non best practice" in the Oracle documentation.
    Alternative Security Administration Options - 11g Release 1 (11.1.1)
    (This appendix describes alternative security administration options included for backward compatibility with upgraded systems and are not considered a best practice.)
    Managing Session Variables
    System session variables obtain their values from initialization blocks and are used to authenticate Oracle Business Intelligence users against external sources such as LDAP servers or database tables. Every active BI Server session generates session variables and initializes them. Each session variable instance can be initialized to a different value. For more information about how session variable and initialization blocks are used by Oracle Business Intelligence, see "Using Variables in the Oracle BI Repository" in Oracle Fusion Middleware Metadata Repository Builder's Guide for Oracle Business Intelligence Enterprise Edition.
    How confusing... what is the best practice then?
    Thank you for your help.
    Joao Moreira

    authenticating / authorizing part is take care by weblogic and then USER variable initialized and you may use it for any initblocks for security.
    Init block for authenticating / authorizing and session variables are different, i guess you are mixing both.

  • Problem with Session variable initialization block

    Hi,
    I'm getting strange results when using session variables in my repository files.
    I have created session variables as specified in the document which is available at
    http://www.oracle.com/technology/obe/obe_bi/bi_ee_1013/bi_admin/biadmin.html
    The main problem getting with the system session variable (USER) in the select statement.
    My select statement is as follows,
    select ':USER',case when upper(':USER') = 'KUMAR' then 'APR-05' end from Dual
    The problem is while logging into the BI Answers it is allowing all the invalid users to login who does not exist.
    when i remove the quotes and simply use :USER in the select statement it is not allowing the invalid users to login but giving error while displaying the results.
    when i remove the user variable from select statement its giving correct results.
    Can i know what is causing the problem.
    Thanks,
    Kumar.

    Hi DK,
    Check out my post Rowlevel Security?? and see if it helps you.
    Cheers!
    -Joe

Maybe you are looking for

  • How do I use the TRIM function in my Query?

    I have a field that has called AP.service_user_defined_1 that houses a Code the code is like Alpha Num ie "AA01" then it has about 30 to 40 whites spaces and then the description of what the code means. I need to have the description to show in my re

  • G/L accounts linking with sales tax and VAT

    Hi gurus,          I want to link the G/L account with Sales tax and VAT for this wat i can do and where,plz help me, it is very urgent. Regards, Dharma.

  • Why start iCloud drive when Yosemite is not ready? Once accidental start iCloud drive, no downgrade option?

    When IOS8 is release there is a simple switch to start iCloud Drive.  It is a nightmare.  My iWork field can no longer be sync with my Mac and Mac Air. There is no downgrade method to resume the usual iCloud support.  Yosemite is not ready now. There

  • Notes suddenly not syncing properly?

    I've been a keeping a list of iOS  7 problems which I periodically update as I come upon something new. I did an edit of that list on my iPhone 4S while my iPad  4 was updating my photo streams. When I then went to Notes on my iPad, I had two copies

  • Mail - 178 Mb of mail on HDD, not in Mail app.

    Hello! I have 4 accounts - a .Mac, a Gmail, a Yahoo, and my school's POP account. In all 4 acounts combined, I have about 240 messages in the Mail app, or about 60-70 MB - I trashed the rest, as they were either junk, or I didn't need them any longer