Set a LOV based on another LOV when the parent value is NULL

Application Express 4.1.1.00.23
Oracle Database 11g
I have two Select Lists (LOV 1 and LOV 2) Items of several other items in a HTML region. LOV 2 is based on value in LOV 1 which is perfectly working. But I need to display some values in LOV 2 when value in LOV 1 is null which is not working at all. Any help is appreciated.
Thanks,
Sam

Hi Sam,
Sam82 wrote:
Application Express 4.1.1.00.23
Oracle Database 11g
I have two Select Lists (LOV 1 and LOV 2) Items of several other items in a HTML region. LOV 2 is based on value in LOV 1 which is perfectly working. But I need to display some values in LOV 2 when value in LOV 1 is null which is not working at all. Any help is appreciated.
Edit your LOV2 and do the changes suggested below
Cascading LOV Parent Item(s) : LOV1
Optimize Refresh : No (this is important not forget to make it NO)
List of values definition : try to use query similar like this
IF :P2_LOV1 IS NULL THEN
RETURN 'select ENAME as display_value, EMPNO as return_value  from EMP';
ELSE
RETURN 'select ENAME as display_value, EMPNO as return_value  from EMP where  DEPTNO = :P2_LOV1';
END  IF;
Hope this will works for you,
Regards,
Jitendra

Similar Messages

  • Time when the waveform value cross a determined level

    Hi all,
    I'm using PCI-5112 with Labvew to capture a waveform and i'm getting a triangle form waveform type. How to find the time when the waveform value cross some predetermined values. To put it more clearly, I attached a picture. In my picture, I want to know TH (time interval when the Y value cross 100), TM ( time interval when the Y value cross 50), TL (time interval when the Y value cross 20). How to put these measurements through Labview program? Any clue or example would be very helpful. Thx  
    Attachments:
    description.jpg ‏22 KB

    You can do this using the built-in NI-SCOPE functions or the LabVIEW pulse waveform measurements VIs by tweaking the reference levels appropriately.  However, given the noise level in your signal, you may not be happy with the result, since these measurements are done essentially on a point-to-point basis.  A more robust option is to find the approximate location of the level crossing, take N points on either side of it, do a simple curve fit to this data, then use the curve fit to determine the actual level crossing.  A line fit would work on the first part of your curve, an exponetial or parabolic fit on the second.  A further optimization would be to use a robust fitting method, but it does not look like you need to go that far.
    If you need more details on any of these methods, let us know.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • [svn:osmf:] 11359: Fixing MetadataWatcher not invoking a value change callback when the parent facet of the target value is added or removed .

    Revision: 11359
    Author:   [email protected]
    Date:     2009-11-02 05:20:01 -0800 (Mon, 02 Nov 2009)
    Log Message:
    Fixing MetadataWatcher not invoking a value change callback when the parent facet of the target value is added or removed.
    Modified Paths:
        osmf/trunk/framework/MediaFramework/org/osmf/metadata/MetadataWatcher.as
        osmf/trunk/framework/MediaFrameworkFlexTest/org/osmf/metadata/TestMetadataUtils.as

    mikeporter wrote:
    I'm sorry I'm not aware of any "cumbersome" subpanels - unless of course you don't know what you're doing. There is this wonderful invention called a "subVI" that can be used to organize and simplify your code, or are they too "cumbersome" as well? You should really learn a bit about what you are pontificating over before you start running off at the mouth.
    Mike...
    I didn't want to step on your toes. No need to get personal.
    Subpanels make some additional code necessary that hasn't got to do anything with the actual program. And I AM using subIVs as I wrote in my first post, which is exactly the root of the problem.
    Nevertheless I now solved it in a way that comes close to what I wanted. I don't know if some of you meant your suggestions to be understood that way (at least I didn't ). The subVIs will now "insert" themselves (via invoke node) into a subpanel on the main vi, which they are given a reference of at call. This adds minimal aditional code, especially on the main VI which I want to keep as clean as possible. By clustering the panel reference into the parameters the subVIs are already given (not used in the example I attached below), there isn't even a change on the terminals of the subVIs.
    I got to check now if this works well with event structures within the subVIs or if it can create the same problems like multiple event structures within a single VI.
    So no global variables anymore and no writing values by property node. I don't know if this just wasn't possible in previous Labview versions I had a try at that (I guess it was 8.6 and/or 2009) or I just didn't come up with the idea back then.
    And if the text wasn't that helpful, here are two screens:
    Parent VI:
    SubVI:
    Attachments:
    main.png ‏2 KB
    subvi.png ‏5 KB

  • LOV Displays the Return Value when Read Only

    Greetings,
    I searched for a question/answer for this, but didn't find this exact scenario mentioned, but I may have missed it. If you know of this already been asked/answered just point me to the thread.
    On APEX version - 4.1.1.00.23
    I have a LOV that is populated by a dynamic action from another LOV. That works great. Depending on the value of another page item the 2nd LOV is Editable or Read Only. The problem is that when the 2nd LOV is Read Only the result value (an ID) displays instead of the display value.
    1 - Why is this?
    2 - How do I prevent this from happening?
    Also, I don't want 2 separate page items (one for edit, one for display) for the 2nd LOV, because the 2nd LOV also has a dynamic action on it to populate a 3rd LOV. The population of the 3rd LOV works great, whether the 2nd LOV is editable or read only.
    = = = = = = = 2nd LOV SQL = = = = = = =
    select sub_com_desc||' - '||commodity_desc d, defect_code_header_id r
    from qcis_defect_code_header
    where inactive_date IS NULL and plant_id = :P10_PLANT_ID
    order by sub_com_desc
    = = = = = = = = = = = = = = = = = = = =
    Thanks, Tony
    Edited by: cloaked on May 8, 2013 12:11 PM

    I've decided to try a different approach. Since the Select List LOV was Read Only and not populating correctly it was causing a session state error when inserting the row. So, I've made the Select List LOV editable, but it shouldn't be. I now need to disable the page item using JavaScript to prevent it from being changed. I need to do so only when a page item contains a certain value.
    Will someone share an example of JavaScript snippet of code I need to use? (I'm not much of a JavaScript coder.)
    The page item I need to disable is named - P10_DEFECT_HEADER_ID
    I need to disable it when P10_MAP_TYPE = 'P'
    Thanks, Tony
    Edited by: cloaked on May 15, 2013 1:00 PM

  • Not validating against LOV if the field is not null

    hi all,
    i am using form6i.
    i have two fields called p_code,p_doc.
    p_code is optional and p_doc is mandatory. Both the fields is having LOV. Based on the p_code, p_doc should be filtered.
    both fileds i have given validate_from_list true.
    if user entered some values and processed after that without clearing the fields(p_doc) if user enters the data p_code the values in the LOV for p_doc is filtering(refreshing) but the value is not validate against the LOV.
    that means
    p_code p_doc
    aa 123
    bb 456
    first time for the code 'aa' the p_doc value was 123. now again user entered bb so that in the lov p_doc 456 is present but in the item still 123 is there. If user press the ENTER or TAB the cursor is going to next field with out valudating the value in the p_doc(old value is 123 but it should replace by 456) but is not showing any error also.
    if my requirement is not clear.please let me know.
    Thanks..

    Because the value in P_DOC is not getting validate. How about trying the below code in WHEN-VALIDATE-ITEM trigger of P_CODE
    :P_DOC:=:P_DOC;-Ammad

  • Radio group in classic report based on another column on the same row.

    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    Application Express 4.1.0.00.32
    How can I have a radio group column based on an LOV utilizing another column on the same row of the report?
    For example: what if I had a survey application and depending on the likert scale that was assigned to the question there would be different possible answer choices:
    Question 1 on row 1 of the report: The class instructor was friendly?
    Likert scale choice is Agreement.
    Choices on Radio Group: Strongly Agree, Agree, Undecided, Strongly Disagree
    Question 2 on row 2 of the report: The class offered good materials?
    Likert scale choice is Quality.
    Choices on Radio Group: Excellent, Below Average, Average, Above Average, Excellent
    The radio group can change per row depending on the Likert scale assigned to the question which is assigned to a different column on the row.
    Can LOV utilize the column? :
    SELECT scale_text
    FROM scale_choices
    WHERE scale_category_choice_id = 2 <<= this would be the Likert scale identifier
    ORDER
    BY display_order

    Here is the answer:
    APEX_ITEM.SELECT_LIST_FROM_QUERY(
    p_idx IN NUMBER,
    p_value IN VARCHAR2 DEFAULT NULL,
    p_query IN VARCHAR2,
    p_attributes IN VARCHAR2 DEFAULT NULL,
    p_show_null IN VARCHAR2 DEFAULT 'YES',
    p_null_value IN VARCHAR2 DEFAULT '%NULL%',
    p_null_text IN VARCHAR2 DEFAULT '%',
    p_item_id IN VARCHAR2 DEFAULT NULL,
    p_item_label IN VARCHAR2 DEFAULT NULL,
    p_show_extra IN VARCHAR2 DEFAULT 'YES')
    RETURN VARCHAR2;

  • Values in one field based on another field in the paper parameter form.....

    Hi All,
    I have two fields in the parameter form. One named 'employee number' and the other named 'document number'. Now, there are multiple document numbers for every employee. I'd like the document numbers to be displayed automatically as an LOV or would like to give the user some help when the employee number is entered manually. Please let me know if this is possible in Oracle reports. I read somewhere that I'll have to call the values from the form. if that is the case. then please let me know how to go about it....
    Regards,
    Shri

    Hi Hari,
    Considering both Market Segment and Application fields are dropdown,
    1) define an event for the first dropdown in the get_p method ie., Market Segment field
    2) In the get_v method of the second dropdown get the value of hte 1st dropdown and filter your field accordingly
    Note: The reason for defining an event in (1) is just to do a server submit.. its actually act as a dummy event if you dont want to handle your logic here
    Hope this was helpful.
    Best Regards,
    Lakshminarayana

  • Restrict variable values based on another variable in the bex query...

    I am struggling to restrict the variable values from other varaible in the selection criteria. I have a variable which restricts he organisation(0ORGUNIT) and another to restrict employees.
    When the user selects any organisation unit form the hierarchy, I want only those employees related to that organsation in the varaible selection options.
    Is there any way I can make a variable values dependant on the another variable value in variable selection screen?
    Thanks,
    Your help in this matter will be much appreciated.
    Edited by: Kthapa on Nov 25, 2010 11:08 PM

    Hi Kthapa,
    Did u try using cmod?
    i_step = 1? Used to provide default values for the selection screen variables and
    i_step = 2 for filling up the variables after selection screen.
    Try using based on ur requirement.
    Hope this helps. Revert back for any queries.

  • Count Distinct based on another column in the same table

    Hello,
    My question in short: is is it possible to add a new column to a view which holds the DISTINCT COUNTS of values/domains of another column in the same view?
    For example, in the below table the column "Distinct Count of Occurence" shows how many distinct values a person has in the Occurence column. So AAA has 1 and 2 therefore it is 2 distinct values etc.
    My issues is that I can retrieve unique values bu Count (Select Occurence)but I can not add the new column that would add the records to the corresponding Persons in the above table.
    Is there an easy way to achieve this on the DWH level or should it be done with MDX in the cube?
    Thanks

    Hi,
    Below a solution to use the view by adding a column with window functioning, maybe this will help.
    CREATE TABLE #TMP
    PERSON VARCHAR(10),
    OCCURENCE SMALLINT
    --DROP TABLE #TMP
    INSERT INTO #TMP(PERSON,OCCURENCE)
    VALUES
    ('AAA','1'),
    ('AAA','2'),
    ('BBB','1'),
    ('BBB','1'),
    ('BBB','1'),
    ('CCC','1'),
    ('CCC','2'),
    ('CCC','3');
    --TRUNCATE TABLE #TMP
    WITH CTE
    AS
    SELECT PERSON
    ,OCCURENCE
    ,ROW_NUMBER() OVER(PARTITION BY PERSON ORDER BY OCCURENCE) AS RN
    FROM #TMP
    SELECT PERSON, MAX(RN) AS RN
    FROM CTE
    GROUP BY PERSON
    Regards,
    Reshma
    Please Vote as Helpful if an answer is helpful and/or Please mark Proposed as Answer or Mark As Answer when question is answered

  • Querying last element in a dimension based on another level in the same dimension using MDX

    Summary: I need to write an MDX that returns the last date available in the level in the date dimension based for each month in the same dimension.
    Details: i have the a dimension which has the following levels. 
    Dim_Date :  Date (key) , Month (name of month), Quarter, Year.
    The query i m trying to come up with would return the result something like
    Month  || Max_date || measure1
    Jan         2014-01-25    100
    Feb        2014-02-28     200
    Please let me know if the above makes sense. Basically i m trying to get the max date for each month. 
    Thanks
    Sri

    Hi SrikanthGS,
    Assuming that with the last date available for the measure you mean the last date with non-empty figures, consider the following against the AW:
    SELECT [Measures].[Internet Sales Amount] ON 0,
    Generate (
    [Date].[Calendar].[Month].Members,
    ( Exists ( [Date].[Month of Year].[Month of Year], [Date].[Calendar].CurrentMember ),
    Tail (
    NonEmpty (
    Descendants ( [Date].[Calendar].CurrentMember, [Date].[Calendar].[Date] ),
    [Measures].[Internet Sales Amount]
    1
    ) ON 1
    FROM [Adventure Works]
    WHERE [Product].[Product Categories].[Subcategory].&[1]
    Philip,

  • OIF SP errors when the mapped nameid is "NULL"

    I have an OVD adapter that joins a Database that has the following key columns
    uid=security_code
    cn=individual_id
    ssoid=sso_code
    all the above columns will be in headers as Header vars.
    In the case if the UID(security_code) is NULL then the federation is erroring out. If this field is not null it works.
    Tried changing the attribute mapping in OVD so that UID maps to cn(which is always not null), but the SP user data store has User ID Attribute set to "uid" in OIF-Administration-data Stores-User data store. If i change the "uid" in OIF to other attributes, none gets authenticated.
    Is there any trick that i can get authenticated when the uid is NULL?
    Thanks
    Srini

    Hi,
    Check out the following link:
    [https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=997810]
    Hope this helps.
    Manoj

  • How to Navigate from af:internalFrame to another page in the parent frame?

    Hi!
    I'm using an ADF IFrame Component <af:internalFrame>..
    we have a requirement where we needed to navigate from a page in the Internal frame to another page in the browser, i.e., on clicking a ceratain button in IFrame , the browser window should load an another page in the main window/frame(not in IFrame). I know this can be done with javascript by setting the
    window.location='newurl'
    But that would take me away from the normal JSF lifecycle, that is I have to perform certain processing of the inputs from the Iframe, and then navigate in the normal JSF way to another page in the main browser window,according to the navigation configured in the faces-config.xml; or if possible, programmatically ,in the backing bean.
    Can someone give me any hint of how to do this?
    Thanking you in advance,
    Samba

    Correct. To achieve this functionality JavaScript is required.
    --Ric                                                                                                                                                                                           

  • Binding textbox to combobox selected value when the selected value is blank

    I have a simple form that binds data to a combobox and when one of the values in the combobox is selected it fills a textbox with the corresponding column in that table.  However, if that combobox value is empty(meaning that table cell is empty) then
    the textbox will not fill with the correct value.  I am finding this hard to explain so I will lay it out.
    The table[COA] is as follows:
    ID
    Fund
    Fund Description
    Bus Unit
    Bus Unit Description
    Obj
    Obj Description
    Sub
    PEC
    1
    2789
    Account Refund
    10000
    General Fund
    1500
    ASC Voucher
    10
    2
    2789
    Account Refund
    10000
    General Fund
    1500
    Voucher
    The following is my code:
    private void subComboBox_SelectedIndexChanged(object sender, EventArgs e)
    pECTextBox.Clear();
    using (SqlConnection connection = new SqlConnection(@"Data Source=MARYANNEBORJA\SQLEXPRESS;Initial Catalog=jdeDatabase;Persist Security Info=True;User ID=Jordan;Password=*****"))
    SqlCommand command = new SqlCommand("SELECT * FROM [COA] WHERE [Bus Unit]='" + bus_UnitComboBox.Text + "' AND [Obj] ='" + objComboBox.Text + "'AND [Sub] ='" + subComboBox.Text + "'");
    command.Connection = connection;
    connection.Open();
    SqlDataReader read = command.ExecuteReader();
    while (read.Read())
    if (!read.IsDBNull(8))
    pECTextBox.Text = (read["PEC"].ToString());
    else
    pECTextBox.Text = "";
    obj_DescriptionTextBox.Text = (read["Obj Description"].ToString());
    read.Close();
    I fill my combobox with Sub values based on the Bus Unit and Obj.  Since the Bus Unit and the Obj in both rows are the same the combobox is filled with 10 and "".  
    Here is where the problem occurs.  When I select "10" in the combobox I want a textbox to fill with correct Obj Description field.  So selecting "10" would give me 'ASC Voucher' in the textbox and selecting "" should
    give me 'Voucher' in the textbox, but this is not the case.  I can only get 'ASC Voucher' to fill the textbox.  When I select "" it keeps the textbox at 'ASC Voucher'.
    My guess us that is has something to do with the value being empty in that table cell because when I am selecting other values it works.  
    Any guess as to what I should do?

    Hi objectifyThat,
    When Your subComboBox.Text is null, you should use "Sub is null" in your SQL like below.
    private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
    pECTextBox.Clear();
    using (SqlConnection connection = new SqlConnection(@"Data Source=MARYANNEBORJA\SQLEXPRESS;Initial Catalog=jdeDatabase;Persist Security Info=True;User ID=Jordan;Password=*****"))
    string cmdstring = "SELECT * FROM [COA] WHERE [Bus Unit]='" + bus_UnitComboBox.Text + "' AND [Obj] ='" + objComboBox.Text + "'AND [Sub] ='" + subComboBox.Text + "'";
    if (string.IsNullOrEmpty(subComboBox.Text))
    cmdstring = "SELECT * FROM [COA] WHERE [Bus Unit]='" + bus_UnitComboBox.Text + "' AND [Obj] ='" + objComboBox.Text + "'AND [Sub] Is Null";
    SqlCommand command = new SqlCommand(cmdstring);
    command.Connection = connection;
    connection.Open();
    SqlDataReader read = command.ExecuteReader();
    while (read.Read())
    if (!read.IsDBNull(8))
    pECTextBox.Text = (read["PEC"].ToString());
    else
    pECTextBox.Text = "";
    obj_DescriptionTextBox.Text = (read["Obj Description"].ToString());
    read.Close();
    If you have any other concern regarding this issue, please feel free to let me know.
    Best regards,
    Youjun Tang
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Diplaying some text when the formula value is negative

    Hi all,
    I am calculating the date difference using the formula  diff= date1- date2.
    My requirement is when the diff is negative it has to displayed as # or with some text but not as zero .
    Regards

    You can display some random number say 999999 instead of # or text.Is that feasible ?
    As # and text cannot be used for key figures.
    You can create a formula like :
    ( diff < 0 ) * 99999 + (diff >= 0 ) * diff
    Hope this helps.

  • Populate a table field based on another field in the same table

    Hi,
        I have a table with fields collection profile and collection prfile text. When maintaining this table, the collection profile name should appear automatically ( from table UDM_COLL_GRPT) based on the collection profile entered.. In UDM_COLL_GRPT, collection profilr name is not a primary key. Please let me know how to do this.
    Thanks in advance,
    Jissa

    Guess you could make use of the event 05 from the TMG events to make the appropriate selections and populate the field.
    Vikranth

Maybe you are looking for