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

Similar Messages

  • How to update zero to a column value when record does not exist in table but should display the column value when it exists in table?

    Hello Everyone,
    How to update zero to a column value when record does not exist in table  but should display the column value when it exists in table
    Regards
    Regards Gautam S

    As per my understanding...
    You Would like to see this 
    Code:
    SELECT COALESCE(Salary,0) from Employee;
    Regards
    Shivaprasad S
    Please mark as answer if helpful
    Shiv

  • My lov returns AND displays the return value

    Hi,
    For 1 of the columns I'm representing in APEX, I choose 'Display as text, based on a lov'. I'm using:
    select aan.id||', '||r.naam||', '||a.woonplaats d, aan.id r
    from wmo_aanvragen aan
    , wmo_dossiers d
    , wmo_relaties r
    , wmo_adressen a
    where d.avg_1_id = aan.id
    and d.rel_nummer = r.nummer
    and a.rel_nummer = r.nummer
    and a.id = (select min(e.id) from wmo_adressen e where e.REL_NUMMER = r.nummer
    and e.EIND_DATUM is null)
    and d.id = (select min(f.id) from wmo_dossiers f where f.AVG_1_ID = aan.id)
    But somehow it returns AND displays the 'aan.id' value instead of displaying the display value. Does anyone know howcome?? In TOAD it works fine. Starting a new page also doesn't make any sense
    Niels

    Nope, doesn't work either.
    I've an identical statement which does work...
    select z.id||', '||zst.omschrijving||', '||r.naam||', '||a.woonplaats d, z.id r
    from wmo_zorgverleners z
    , wmo_zorgverlener_soorten zst
    , wmo_relaties r
    , wmo_adressen a
    where z.zst_id = zst.id
    and z.rel_nummer = r.nummer
    and a.rel_nummer = r.nummer
    and a.id = (select min(e.id)
    from wmo_adressen e
    where e.REL_NUMMER = r.nummer
    and e.EIND_DATUM is null)
    Here,iIt does display the contcatenated text..

  • How do I display the correct value when using SELECT_LIST_FROM_QUERY

    I have an updatable report that displays the possible values for a field.
    I'm using HTMLDB_ITEM.SELECT_LIST_FROM_QUERY, so obviously I have to process the record manually.
    However, I need the trick to display the correct value as selected before processing the records.
    I appreciate your help.
    Thanks
    Juan

    Thank you.
    So, I just need to put the field name in the second argument.
    I have it working now.
    Thanks again
    Juan

  • How to display the return value of a function in a text field

    Hi,
    I have 2 textfields in a page.
    i> Empno
    ii> Salary
    The requirement is,
    i. Enter an Employee No.
    ii. On click of the 'SUBMIT' button a process would be executed which calls a function (or procedure with out parameter) which returns the Salary of the given Employee.
    iii. Need to display the salary to the 2nd textfield (Salary).
    Here is my process:
    i. If procedure call-- :P2_X is a page text field and out parameter.
    begin
    Pri_test_PROC(:P2_EMPNO,:P2_X);
    end;ii. If Function call --
    begin
    :P2_X:=Pri_test_PROC(:P2_EMPNO);
    end;
    Issue:
    The process is not getting executed and returning the process error message.
    Could anyone please give me a pointer, how to overcome the issue. Or if this is not the right way, then what is the work around.
    Regards
    Antara

    Antara,
    1. Clue about the error - yes, when I see the error message.
    2. What happens if you try to create a procedure like this:
    CREATE OR REPLACE PROCEDURE fetch_sal (in_emp IN NUMBER, out_sal OUT NUMBER)
    IS
    BEGIN
       FOR c IN (SELECT sal
                   FROM emp
                  WHERE empno = in_emp)
       LOOP
          out_sal := c.sal;
       END LOOP;
    END;and then run this in SQL Plus:
    DECLARE
       v_sal   VARCHAR2 (20);
    BEGIN
       fetch_sal (7839, v_sal);
       DBMS_OUTPUT.put_line (v_sal);
    END;What do you get displayed?
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • How to Access the Return Value of a Function

    Hi,
    How do I access the return value when calling an Oracle function from .NET using Oracle.DataAccess.Client? The function returns an integer of 0, 1 or 99.
    Dim db_command_oracle As New OracleCommand()
    db_command_oracle.Connection = db_connection_oracle
    db_command_oracle.CommandType = CommandType.StoredProcedure
    db_command_oracle.CommandText = "swsarsi.import_appointments"
    Dim ret_value As New OracleParameter()
    ret_value.OracleDbType = OracleDbType.Int32
    ret_value.Direction = ParameterDirection.ReturnValue
    ret_value.Size = 2
    ret_value.OracleDbType = OracleDbType.Int32
    db_command_oracle.Parameters.Add(ret_value)
    Dim IN_student_id As New OracleParameter()
    IN_student_id.OracleDbType = OracleDbType.Varchar2
    IN_student_id.Direction = ParameterDirection.Input
    IN_student_id.Size = 10
    IN_student_id.Value = student_id
    db_command_oracle.Parameters.Add(IN_student_id)
    db_command_oracle.ExecuteNonQuery()
    messagebox.show(ret_value) ?????

    Your ODP.NET code looks correct. What error are you seeing?
    One thing that will definitely generate an error is that .NET message boxes require that strings be displayed. ret_value is a parameter object. You need to access its value and convert it to a string. At a minimum, you need to change that.

  • Remote Object - not able to get the returned value from java method

         Hi ,
    I am developing one sample flex aplication that connects to the java code and displays the returned value from the
    java method in flex client. Here I am able to invoke the java method but not able to collect the returned value.
    lastResult is giving null .  I am able to see the sysout messages in server console.
    I am using flex 3.2 and blazeds server  and java 1.5
    Here is the code what I have written.
    <?xml version="1.0" encoding="utf-8"?><mx:WindowedApplication  xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" backgroundColor="#FFFFFF" initialize="initApp()">
     <mx:Script><![CDATA[
    import mx.controls.Alert; 
    import mx.binding.utils.ChangeWatcher; 
    import mx.rpc.events.ResultEvent; 
    import mx.messaging.*; 
    import mx.messaging.channels.* 
    public function initApp():void { 
         var cs:ChannelSet = new ChannelSet(); 
         var customChannel:Channel = new AMFChannel("my-amf", "http://localhost:8400/blazeds/messagebroker/amf");     cs.addChannel(customChannel);
         remoteObj.channelSet = cs;
    public function writeToConsole():void {      remoteObj.writeToConsole(
    "hello from Flash client");
          var returnedVal:String = remoteObj.setName().lastResult;     Alert.show(returnedVal);
    //[Bindable] 
    // private var returnedVal:String; 
    ]]>
    </mx:Script>
    <mx:RemoteObject id="remoteObj" destination="sro" /> 
    <mx:Form width="437" height="281">
     <mx:FormItem>  
    </mx:FormItem>  
    <mx:Button label="Write To Server Console" click="writeToConsole()"/>
     </mx:Form>
     </mx:WindowedApplication>
    Java code
    public  
         public SimpleRemoteObject(){  
              super();     }
      class SimpleRemoteObject { 
         public void writeToConsole(String msg) {          System.out.println("SimpleRemoteObject.write: " + msg);     }
         public String setName(){          System.
    out.println("Name changed in Java"); 
              return "Name changed in Java";
    And I have configured destination in  remote-config.xml
    <destination id="sro">
       <properties>    
        <source>SimpleRemoteObject</source>
        <scope>application</scope>
       </properties>
      </destination>
    Please help me .

    You are not able to get the returned value because if you see the Remote object help you will realise you have to use result="resultfn()" and fault = "faultfn()"
    In this you define what you wish to do.
    More importantly in the remote object you need to define which method you wish to call using the method class like this
    <mx:RemoteObject id="remoteObj" destination="sro" result="r1" fault="f1"  >
         <Method name="javaMethodName" result="r2" fault="f2"/>
    <mx:RemoteObject>
    r2 is the function where you get the result back from java and can use it to send the alert.

  • My lov results into the return value instead of the display value in APEX

    Hi,
    For 1 of the columns I'm representing in APEX, I choose 'Display as text, based on a lov'. I'm using:
    select aan.id||', '||r.naam||', '||a.woonplaats d, aan.id r
    from wmo_aanvragen aan
    , wmo_dossiers d
    , wmo_relaties r
    , wmo_adressen a
    where d.avg_1_id = aan.id
    and d.rel_nummer = r.nummer
    and a.rel_nummer = r.nummer
    and a.id = (select min(e.id) from wmo_adressen e where e.REL_NUMMER = r.nummer
    and e.EIND_DATUM is null)
    and d.id = (select min(f.id) from wmo_dossiers f where f.AVG_1_ID = aan.id)
    But somehow it displays the 'aan.id' value instead of the display value. Does anyone know howcome?? In TOAD it works fine
    Niels
    Edited by: user6394263 on 10-apr-2009 1:22

    Hello Niels,
    Your LOV Displays your concatenated value, but returns the "aan.id" (into the Form field), just as expected. If you want to show the description on your Form, use a PopUp LOV - Displays Description Return Key value
    Greetings,
    Roel
    http://roelhartman.blogspot.com/
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • How to get the return value of a LOV item using javascript

    Hello,
    I am trying to put an onchange attribute in the HTML Form Element Attributes field of a LOV item. The javascript should access the new return value of the item. How is this done ? All the methods I have tried give only the display value, not the return value. For example $v() returns the display value.
    Tiina

    If your item is called P1_ITEM this will give you the return value of a popup (displays description,returns key value)
    alert($x('P1_ITEM_HIDDENVALUE').value)
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • Popup LOV with same display and return values

    Hi
    I have created a List of Value using the following query.
    SELECT partner_name display, partner_name return
    FROM partner_table
    WHERE partner_name is not null
    order by 1
    The above query returns around 3000 rows of data. This has been linked to Item as Popup Key LOV(Displays description, returns key value). When the popup is selected the values are not displayed, only "Row(s) 1 - 10" and pagination buttons are displayed.
    Could anyone please suggest me with a solution.
    Thanks in advance.

    Change the Next button label to remove the > character. This sounds like a familiar problem.
    Scott

  • The return value of sqlcode when select an empty table in a proc code

    Table: test
    there is an empty table. But when I use "select * from test" in a proc code, I found the return value of sqlca.sqlcode is 0, not 1403 (NO MORE DATA). Why ?

    EXEC SQL DECLARE individual_cursor CURSOR for
                   SELECT IATA_C, DELAY, UPDATE_TIME
                   FROM TBL_TIME
                   WHERE IATA_C <> '***' AND
                        FLAG = 1;
    EXEC SQL OPEN individual_cursor;
    while(1) {
    printf("in while");
         if (sqlca.sqlcode == 1403 && individual_flag == 0) {
    printf("no any data");
              return 1;
         } else if (sqlca.sqlcode == SQLNOMORE) {
              break;
         EXEC SQL FETCH individual_without_general_cursor INTO :pnrtime.airline, :pnrtime.delay, :pnrtime.update_time;
    EXEC SQL CLOSE individual_cursor;
    The result is:
    in while
    in while
    no any data
    Since the table is empty, why "in while" is printed twice? And "no any data" is printed in the end? I cannot decide the empty when using "select ... into" in proc unless using "select count(*) from test", right? Thx.

  • How can i fix my iphone 3g if and only it displays the apple logo when it is connected to its charger but it displays nothing when the charger is removed?

    how can i fix my iphone 3g if and only it displays the apple logo when it is connected to its charger but it displays nothing when the charger is removed?

    Plug it into a wall outlet and leave it plugged in for approximately 20 minutes.
    Then try a reset by pressing and holding the home and power buttons for 15-20 seconds.
    Does the device power on at this point?  If not, the battery or logic board is gone.
    Take it to Apple for evaluation.
    It may be worth replacing the battery, but I personally wouldn't spend the $149US for an Out of Warranty replacement on a 3+yr old device.

  • "The selected cells are read-only" error on Custom Field when trying to insert in Datasheet mode

    I have a custom field that works completely fine. Yesterday our QA team found out that when trying to insert in Datasheet format, the error "The selected cells are read-only" was thrown. Any ideas? I tried passing the following property to my fldtypes_field.xml file:
        <Field Name="ReadOnly">FALSE</Field>
    No luck.Victor Palma

    Unfortunately it did not work. I also developed the code and access the field and checked its property called "ReadOnlyField"  which is already set to false.
    Below is the xml that i am using. Can you please share the xml that you had used?
    <?xml version="1.0" encoding="utf-8"?>
    <FieldTypes>
      <FieldType>
        <Field Name="TypeName">MyCustomField</Field>
        <Field Name="ParentType">Text</Field>
        <Field Name="TypeDisplayName"> My Custom Field</Field>
        <Field Name="TypeShortDescription"> My Custom Field</Field>
        <Field Name="AllowBaseTypeRendering">True</Field>
        <Field Name="ReadOnlyField">False</Field>
        <Field Name="UserCreatable">TRUE</Field>
        <Field Name="ShowInListCreate">TRUE</Field>
        <Field Name="ShowInSurveyCreate">TRUE</Field>
        <Field Name="ShowInDocumentLibraryCreate">TRUE</Field>
        <Field Name="ShowInColumnTemplateCreate">TRUE</Field>
        <Field Name="FieldTypeClass">My Assembly Information goes here</Field>
      </FieldType>
    </FieldTypes>

  • Does Adobe Reader have the plug-in to display the word definition when moving mouse over the word?

    Hi,
    I would like to know if Adobe Reader has such plug-in that displays the word definition when the user moves the mouse over the word.
    Basically I think it needs to
    detect what word is presented under the cursor
    look up the word in the dictionary or source file e.g.xml
    pop up the definition of the word, which can be a translation or definition
    It would be great if user can actually customize this dictionary file/source file.
    Do you think there is such plug-in?
    Many thanks for your help/advice here.
    Cheers
    SX

    Hi,
    When I use Adobe Reader “look up” function, it takes me to dictionary.com. I am wondering if Adobe Reader allows me to customize this look up function, so I can use another website or my offline dictionary, instead of going to dictionary.com.
    Many thanks for your help/advice.

  • I've added a pdf to itunes and i want to change it so its visible with an album (digital booklet). But for some reason, when i click get info, its all greyed out and the little box for read only is unticked. please help - urgent! thanks

    I've added a pdf to itunes and i want to change it so its visible with an album (digital booklet). But for some reason, when i click get info, its all greyed out and the little box for read only is unticked. please help - urgent! thanks

    Hi
    My first thoughts are
    • iMovie ill behaving - Trash the iMovie pref file - use to set things right
    • in reg. to Photos - Did You change iPhoto Photo Library - Then iMovie get's lost as it peeks into iPhoto on start up to see where photos are stored. Set iPhoto back to first Photo Library (when iMovie is not running) then start iMovie.
    Yours Bengt W

Maybe you are looking for