Has no value - INIT Session block definition.

Hello

I have a block of initialization of Session for departments to the recovery of a security for the user table.
A user can have several departments assigned to him, so I enabled an INIT block initialization.
But when a user has not attributed to all departments logs in, I get the error "Session variable has no definition of the value" in all reports. But I'd rather pass a value by default when SQL in INIT block does not do anything. As '0'.
How can I do this? Please answer.

Thank you
Swami

Hi Swami,

When the query retrieves a result set, the variable is initialized.
But, when the query does not retrieve all rows, the variable is initialized and so-error "no definition of value.

So, to avoid this.
In the query itself, place an exception condition that returns '0'.

Select table dept_name
where user_name = ": the user"
UNION
Select '0' in the table
"where user_name <> ': the user"

or you can use like this

SELECT CASE WHEN user_name = ": user" THEN FINISSENT dept_name ELSE ' 0'
table

P.S: Query written oral. (Pls resolve the application accordingly)

Kind regards
Rambeau

Tags: Business Intelligence

Similar Questions

  • LOV displayed as null when it has a value in session state

    I use ajax to Dene Kubinek cascading select list example and it works fine. I have only one small problem. After the process of database update is running, and the page is refreshed the second selection list of with the null value when it has a value of 6 session state. Even if the database is updated with the correct value users will think that a null value has been updated because it shows - select Team - rather than the team that was selected.

    How can I fix it? I have read dozens of threads on the forum about the cascading selection lists and none of them seem to address this issue. I followed messageID = 2803572. When I changed the first select list of a select list with submit it wouldn't work because the onchange process did not run.

    It's very frustrating because the first select list contains the correct value in session state, and it is to show the selected value. I only have this problem with the second select list. I don't have two selection lists, one meets the other.

    Here is the code for my second selection list:

    SELECT TEAM_DESC, TEAM_ID
    OF CEAH_TEAMS
    WHERE UNIT_ID = NV(:P116_CENTER) or NV(:P116_CENTER) = - 1

    I use the same code in another form and it works very well. The only difference is that the other form already has a value for the first list in the selection, so I didn't need additional code to check the value zero. If I don't check the null value (: P116_CENTER = - 1) I get a LOV error when the page initially loads.

    Help. Thanks in advance, Elizabeth

    Salvatore - brilliant! Of course.

    Scott

  • Definition of textfield value of session using apex_util.get_session_state

    Hi guys,.

    In my form, I created a bunch of text field. How to retrieve the value of the get_session and throw in a text field?

    So, at PAGE 16, I have a field of text called P16_USERNAME that I filled with value of session I have put on page 15, by creating a process called:

    APEX_UTIL.set_session_state('P15_USERNAME',:P15_USERNAME);

    Thank you very much.

    Hello

    Why don't you just set the element of your page (eg. P16_TEST) with the following parameters:

    Source type: point
    Source of value or an expression: P15_USERNAME

    Or you can use the default value property and set it to

    &P15_USERNAME.
    

    In general, you should never have to call apex_util.set_session_state, simply use bind variables for the assignment.

    :P16_TEST := :P15_USERNAME;
    

    Concerning
    Patrick
    -----------
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • With the help of APEX_UTIL. SET_SESSION_STATE to set an element value in Session State?

    Goal: Refresh a region but not the entire page, where the region has a query based on the value of a page element, that the user has selected. I (think) I () would be the updating of the region works well but the page element that uses the query is not in State of Session!

    The current issue: I have a procedure (APEX_UTIL. SET_SESSION_STATE) to assign a value to the user enters the Session State, but how do I get this value in the first place?

    What I have in the region:
    : P23_SELECT_RUN_DT (date picker)
    Lines extracted according to the date picker. Initially, the query retrieves all rows because: P23_SELECT_RUN_DT (date picker) is null.

    I'm trying to follow {message identifier: = 9781139},
    I added a DA (event: change) with the following PL/SQL:
    BEGIN
        APEX_UTIL.SET_SESSION_STATE('P23_SELECT_RUN_DT','???');
    END;
    But how do I specify the value to use is the date picker? I can't use: P23_SELECT_RUN_DT; It has the value null.

    I added this: point P23_SELECT_RUN_DT for an example, I'm already working:
    WS: APEX_EXAMPLES_01
    USER: demo
    PW: demo
    Application: 991203 - BPR_991203 Page 23 (tab: Master 3)
    Click the edit Pencil after 'ProgramName 1' to fill the three regions. The date picker is the third region.

    What is the approach to use? Can someone suggest an easier way to achieve this?

    Thanks in advance,
    Howard

    Howard (in training) wrote:
    Re my goal:

    The current Question:... to assign a value that the user enters into the State of Session...?

    I thought that maybe this works. I added P23_SELECT_RUN_DT 'Page to present '. I removed the former DAs. Then I added a refresh of the region for the date picker, thinking that the: P23_SELECT_RUN_DT value would be submitted whenever the changed date picker. No joy. The newly selected value is not in Session State.

    ???

    You're going to hate this :D (although I admit it's obscure uber - I was quickly running out of ideas when I noticed it...)

    The problem is the static region ID BPR_RUN details. It is not valid HTML ID attributes cannot contain white spaces. I do not know exactly why the presence of the verboten discombobulates APEX or jQuery so space overall, and I'm not venturing in the debugger to determine. I'll just point to it as another reason to respect some HTML and use the markup compliant to standards.

  • How to keep the value of Session in OBIEE

    I have an obligation to transmit the session of a page variable to the next page in the dashboard.

    Requirement :

    In the part of the presentation:

    Prompt: Column1: year
    Column2: quarter

    I have to pass the selected value in the fast control panel to the repository. To achieve this, I've stored the value of year and quarter column in 2 request variables from the prompt.

    Request Variable1: VarYear stores the value selected year
    Request Variable2: VarQuarter stores quarter selected value

    In the part of the repository:

    1. I created session variables 02 repository with the same name as: VarYear and VarQuarter
    2. under the Block Intitialization of two Variables, I wrote a dummy query as
    ' SELECT PER_NAME_ENT_YEAR FROM W_DAY_D WHERE PER_NAME_ENT_QTR IS NOT
    NULL'
    3. checked the box for "Allow any user set the value" for two session variables.
    4 using the session variable to transmit as a filter on the tab content measurement of the LTS of income as follows:

    «"Oracle Data Warehouse".» Catalog.dbo.Dim_W_DAY_D.PER_NAME_ENT_YEAR = VALUEOF (NQ_SESSION. ("' VarYear") AND "Oracle Data Warehouse. Catalog.dbo.Dim_W_DAY_D.PER_NAME_ENT_QTR = VALUEOF (NQ_SESSION. ("' VarQuarter ')'


    Resolution: The session from the prompt variables is pass correctly to the RPD and returning the result as expected for the current page (invites the two and the report are in the same page where I used the measure of income which is getting filtered in the LTS on the basis of the quarter and the year to the title of the content tab).


    Reuirement2 question:

    I have to navigate from one page to another when the click on the value of the income measure. The target page also contains the same measure of income as in first page. But on the navigation from one page to another page, the session value is getting lost and passing the default value from the block of initialization of the Session instead of the selected value in the command prompt.


    According to my understanding of that session value shouldn't be replaced up to a disconnection from the user of the application. But in my case for the first page where I times Promt and measure revenues the prompt value is pass correctly but when I move to the second page where I only the income measure session value which is already defined at the beginning is replaced with the result of query Session IB.


    Please suggest me if there is no resolution to my problem.

    Thank you very much in advance.
    :)

    I had this problem myself, and here is what I found. The only way I could make it work was to have guests who populate the Session Variables on the pages. In other words if I got the prompt on one page and then used guided navigation to go to another page of dashboard I needed to have the same guests located on this page for session values get passed in. Since in my case I didn't want the guests to view it or the user to know that I had to add the dashboard invites you to capture of Session Variable values, I placed the guests of dashboard for my Session Variables in a separate section and then hid this user story. I hid the section by selecting Properties - Style (HTML only) custom CSS Options and then clicked the box to tick to use Custom CSS Style. In the text box type display: none which will cause the section to hide from the user. Guests will then exist on the dashboard page to receive the session values and the user will never know it's there.

    Hope this helps.

    Eric
    http://www.BIConsultingGroup.com

  • Why do I own this blocking session / blocked

    Oracle 11.2.0.4 SE a 64-bit

    Oracle Linux 5

    We have a task that runs every 5 minutes to detect blocking sessions / blocked.  When it detects an email with the details is sent.  Conduct of query is the following:

    select NVL(s1.username,''null'') username1,
                    s1.machine machine1,
                    s1.sid sid1,
                    s1.osuser osuser1,
                    s1.program program1,
                    lo.object_id locked_object,
                    NVL(s2.username,''null'') username2,
                    s2.machine machine2,
                    s2.sid sid2,
                    s2.osuser osuser2,
                    s2.program program2,
                    sqlt.sql_text sql_text2
             from   v$lock l1,
                    v$session s1,
                    v$lock l2,
                    v$session s2,
                    v$locked_object lo,
                    v$sqltext sqlt
             where s1.sid=l1.sid
               and s2.sid=l2.sid
               and l1.BLOCK=1 and l2.request > 0
               and l1.id1 = l2.id1
               and l2.id2 = l2.id2
               and s1.sid = lo.session_id
               and s2.sql_address = sqlt.address
               and s2.sql_hash_value = sqlt.hash_value
               and sqlt.piece = 0
    

    Normally things are fairly quiet except on the occasion one of my power forgot to engage users.  But last week I started to have notification that a session belonging to me (ESTEVENS) was blocking one or more sessions held by me.  Still, he arrives at 21:00 and fades within 5 minutes before the next review.  The sql code associated with the blocked session is always the same.  Here is a representative sample, with company data obscured.

    Block user - ESTEVENS

    Machine - myserver.mycompany.org

    SID - 433

    OSUSER - oracle

    -PROGRAM [email protected] (J001)

    OBJID - 12451

    Blocked user - ESTEVENS

    Machine - myserver.mycompany.org

    SID - 200

    OSUSER - oracle

    -Program [email protected] (J002)

    SQL: UPDATE HS_FDS_CLASS_DATE SET FDS_CLASS_DATE = SYSDATE WHERE FDS_

    By comparing the time of the block and SIDS reported with DBA_SCHEDULER_JOB_RUN_DETAILS content, I was able to follow some scheduled tasks 'load '.  These jobs do a SELECT... IN... OF < db_link >.  Because the table is locked is HS_FDS_CLASS_DATE, I found notes 1536085.1 describing a bug with the use frequent or simultaneous to a db_link, supposed to be fixed in 11.2.0.4 but my experience says otherwise.  However, I can deal with all that.

    But my real question is how to get my username attached to these sessions?

    Understand your question, I hope...

    It happened to me, that if I use my "DBA1' to create one job to another user"USER1", my user name is indicated as the USER name in the session, but 'The ANALYSIS of the USER' are the owner of the task.

    I think it's normal, but I still don't know why.

    Edit: Duh! It seems that it is documented Overview of job creation

    Because no destination_name attribute is specified, the task runs on the (local) database of origin. The job runs as the user who created the work.

    Kind regards

    Juan M

  • The assignment of value to the block multi-record in Oracle's 10 g

    Hi all

    I'm new to form of Oracle 10 g.

    I have a block of several recording that does not rely on the database. I need to assign the value to this block multi-record dynamically the ref cursor.

    I'm trying to set the value as below, but its does not work. Please help me on this.

    loop
         fetch cur Into screenval_rec ;
          exit when cur%notfound ;
          first_record;
       
      :BLOCK1.COL1:= screenval_rec.value1;
        :BLOCK1.COL2 := screenval_rec.value2;
        :BLOCK1.COL3:= screenval_rec.valu3;
      
         next_record;
    End loop;
    
    

    Kind regards

    REDA

    Hi Craig,.

    Thank you for your information.

    But I found the exact cause of this "Invalid cursor error' (ORA-01001) in Oracle forms. It is because of the unique enclosed in quotes the select statement of the REF cursor. I found in the paragraphs below Oracle.

    Note 170881.1 - ORA-1001 calling a stored procedure that contains a REF Cursor Oracle Forms

    Once I deleted the quotes, it's working properly now.

    Thanks again for your help.

    Kind regards

    REDA

  • Hidden text box and question until what the previous text box has a value that it contains.

    Hello

    I'm trying to create a form that has fields required in it. I know that Adobe Acrobat is a great way to say "Hey, you must complete this part of the form...." "so what I wanted to do was put an overlay of a text box on top of the question, so they can't jump some criteria in the form. For example, if my name is John and my last name is Smith I would like the first (first name) box is visible and the second box (surname) to be hidden until I enter any name such as John, Joe, Chris, Abigail, etc..

    Is it possible that there is that the availability of hide a box of text over the expression until something has a value contained in the previous question?

    Sorry, I'm a newbie to creating forms and would like to get help on this situation.

    Thank you in advance!

    Answered my own question. Must have a "!" in front of the = so that any text!

  • Make a required field if another field has a value

    Hello

    I have created a PDF form and I need to have a validation that checks if a field has a value, then another field is mandatory.  For example: If the hours of field has a value, then the Description field is mandatory, otherwise, Description field is not mandatory.  Any help you can provide would be helpful.

    Thank you.

    As a script custom validation of the hours field, enter this code:

    this.getField("Description").required = (event.value! = "");

  • How to fill out (display) values for several blocks in which there is no relationship between the blocks (tables).

    Hello.

    Is it possible to fill in the values (execute_query) several blocks where there is absolutely no relationship between the tables in the same form?

    There is no relationship between the tables. All are separate tables with different columns. None of the names of columns match

    & also the values of the columns do not match. I created blocks for all tables. When I click on run, only the first block of values (first picture) is filled.

    other values of block did not get filled. Is it possible to fill in the values for all of the blocks where there is not relationship, or when there is no master block?

    Is there something I can do for this? It is mandatory for me to put all the blocks in a single form.

    Help me, please. Please do not respond.

    Thank you.

    Create a key-EXEQRY-trigger on the block where 'throw you' the quers. In it, put something like

    GO_BLOCK ('BLOCK1');

    EXECUTE_QUERY;

    GO_BLOCK ('BLOCK2');

    EXECUTE_QUERY;

    ...

  • v$ instance_recovery.optimal_logfile_size has no value?

    I have a physical primary and standby oracle 10 database and I am noticeing that optimal_logfile_size has no value. Is - this reason to worry? Under what conditions it should not a value for v optimal_logfile_size $ instance_recovery. Thank you

    783527 wrote:
    I have a physical primary and standby oracle 10 database and I am noticeing that optimal_logfile_size has no value. Is - this reason to worry? Under what conditions it should not a value for v optimal_logfile_size $ instance_recovery. Thank you

    This question is belongs to the primary database when the database is OPENED then all writes to online redo logs database changes. A query you will get the results in the primary.

    During the wait for database is in condition to MOUNT , it means it's data files are not open to write transactions by users, then online again here, not even using log files.

    If you are using real-time applies, i.e. LGWR transport service, then you need the redo log ensures files. Of course, we must design them properly. It should be of value the same or higher than log files online that should be good.

    HTH.

  • How to check if the variable (of type uint) has a value or not?

    Hi all

    I'm just trying to write an instruction conditional to check if my uint variable has a value or not.  I tried to check "null" and "undefined", but without any luck (see below)

    private var _tempIndex:uint;

    ...

    ...

    If (_tempIndex! = null) {}

    code here

    }

    had an error with that one, then tried

    If (_tempIndex! = undefined) {}

    code here

    }

    had an error with that as well.

    So, how can I check if a variable has been assigned a value or not? Any ideas? Thanks in advance!

    Mike

    A uint always has a value between 0 and 2 ^ 32-1 inclusive. It cannot store a value 'no' as undefined or null. If you declare a variable of type uint without assigning a value, it is given a default value of 0.

    You need to maintain an indicator Boolean separate or to use a type of data larger such as number (which can store NaN), object (which can store NaN or null), or * (which can store a value, including NaN, null, and undefined).

    Gordon Smith

    Adobe Flex SDK team

  • ODI - Variable error has no value when the regeneration of scenario

    Hey people, how are you doing?

    In my environment, there are two servers, DEV and PROD. We have exported a file to XML of PROD and imported for DEV, there are several packages within this folder that share the same variables of the project. When we import which, if we run one of the scenarios, he asks for a parameter, XXTEST.idExec. Provide us and the interface works normally.

    However, if regenerate us the DEV script without even touching the package, we expected that it works very well, but it gives an error: "XXTEST.idExec - Variable has no value", even if we provided a value for the parameter. What intrigues me is that the package is absolutely the same, simply regenerate it begins to give the Variable has no value errors. Another detail: this is not specific for a single package, all scenarios that regenerate us start giving this same error with this variable.

    Which is perhaps a difference in the environment? Is there something we can do to track this problem?

    Best regards and thanks in advance!
    Thiago

    I think it's a good idea going to 10.1.3.5_02

    To display values, change the variable and have a look at the third tab.

    do the same thing in production... and tell me the results.

    Cezar Santos
    http://odiexperts.com

  • How only include a WHERE clause only when a connection variable has a value?

    I use JDeveloper 11 g using business components of the tables. I'm now modify the auto-generated SQL code to include WHERE clauses which depend on the values of bind variables. For example I have something like this:
    SELECT mytable.firstColumn
    FROM myTable 
    WHERE myTable.secondColumn= :VariableValue
    However, this means that when VariableValue is null SQL would fail and I get an error. Is there a way I can include the WHERE clause (or clause AND according to the position in SQL) only when a bound variable has a value (or a particular value)?

    Or use: WHERE NVL(:VariableValue,myTable.secondColumn) = myTable.secondColumn

  • using the session variable in init. variable init string of session. block

    Hi, experts,

    is it permissible to use a session variable loaded (A) in the initialization string in the block of the initialization of the session to another variable (B).

    for example,.
    in execution, priority of the initialization of B block, added the initialization of a block

    then in the initialization string in the initialization of B block,

    the likes of sql:

    Select a clause where a.xxx = yyy ' valueof (nq_session. (A)'

    What is the correct syntax?

    Thank you very much!

    This is the correct format. If it does not work for you then you need to give more information than what is happening, how fill you your Init blocks etc.

Maybe you are looking for

  • Is it possible to move the message pane at the bottom of the list of messages to the right?

    The question should be explicit. Windows Mail allows the folders pane, the message list and the part of the message to be listing in 3 columns side by side. In Thunderbird the message pane is available only beneathe the message list. Am I missing som

  • Virus Alert 2016

    Unfortunately, my Mac Book Air was hit by a virus for the first time in five years. I was unable to open or use safari because the virus continually would open a new page, me confused on some rogue services. According to me, the virus must have been

  • Need Windows 7 display driver for Satellite L20

    Hello, I have problem with the vga on Windows 7 driver I use xp on Windows 7 drivers, but before you install vga driver windows work speed after install driver vga windows slow work and aero does not work.I go to control Panel\All Control Panel Items

  • Qosmio G30 - Media center remote control does not work in windows

    Dear all, I have a Qosmio G30-194,first I had a problem with VGA, send it for repair, when she comes back, I noticed that the remote does not work on windows Media Center, while that in A / mode V work perfectly. I tried a full system recovery DVD re

  • Pavilion p6000 series p6633w: video card

    I know that my system has a pci 2.0 x 16 slot, is the 3.0 pci card work?  Sapphire Radeon R7 240 2 GB DDR3 HDMI/DVI-D/VGA with Boost PCI-Express-11216-00 - 20G graphics card