fill in the selected field of text based on the value of lov

Hello
Depending on the value selected in lov, I want to fill another text field. Here is the code I wrote

Of the PFR:

If (PageContext.isLovEvent ())
{
String lovInputSourceId = pageContext.getParameter (SOURCE_PARAM);
If ("lovCategory".equals (lovInputSourceId))
{
java.util.Hashtable lovResults = pageContext.getLovResultsFromSession (lovInputSourceId);
if(lovResults!=null)
{
= (String) lovResults.get ("lovCategory"); value string
amobj.categorycode (value);

}
}
}

Code AMImpl:


{} public void categorycode (string code)
sundryCodeVOImpl vobj = getsundryCodeVO1();
vobj.setWhereClause ("lookup_code =" + "'" + code + "'" ' ");
vobj. Reset();
vobj.executeQuery ();

String desc = vobj.first ().getAttribute("Description").toString ();
String attr = vobj.first ().getAttribute("Attribute1").toString ();

testEOViewImpl vobj1 = gettestEOView1();
vobj1. GetCurrentRow () .setAttribute ("CodeDescription", DESC);
vobj1. GetCurrentRow () .setAttribute ("PurchasingCategoryCd", attr);
vobj1. ExecuteQuery();
}

With this code, updates to the code attributes, PurchasingCategoryCd values get inserted in the database table, but they now appear in the text fields when a value is selected in lov.

Please tell me what is the error that I do.


Thank you
Sunny

Hi sunny

Going through the thread, it seems that the application of LOV VO has three columns viz A, B and C. You want to put the value of the B column to a text field, if this is the case. Simply create a LOV mapping for column B.

Also I suggest you take a messagestyledtext for the B field as value comes form LOV himself.

Thank you
AJ

Tags: Oracle Applications

Similar Questions

  • Programmatically fill the values in LOV

    Hello
    I use JDeveloper 11.1.2.2

    I need to fill in the values in LOV programmatically taking values in a result set.
    The LOV is related to support bean and the LOV is updated as the value in the parent THAT LOV is selected.

    Thank you
    Nigel.

    Nigel,

    You can browse the game to build a list of tables of results. Use the ArrayList instance to populate the list.

    See the example (even if the blog is about different usecase, the example here shows how to generate a SOC programmatically).

    http://Redstack.WordPress.com/2012/06/19/method-run/

    Arun-

  • change should only be updated only when the value of lov

    Hi experts Adf.

    JDeveloper 11.1.1.4.0

    I have a usecase where a lov and a field date is in a table. Each time, I have a lov selects for the first time, and then save the button. Then change date is get inserted with null. (it's fine).

    Now when I change the existing value of the lov and then clicking on save, then the modified date is updated. (it is also very good).

    Scenario question: suppose that in the first row, WE show dropdown because it is saved in the database and change date as null.

    However when I try to change the value to lov ' sales and do not click Save. Now, once I select IT and clicking record. In this case, change date is updated.

    Idle screenplay: Change Date must be updated if there is no modification.

    Untitled.jpg

    If (operation == DML_UPDATE) {}

    setModifyDate (newTimestamp (System.currentMillis));

    }

    You can check the value of publication and skip this step if postedValue is newValue.

    See this example: http://adfcodebits.blogspot.com/2010/07/bit-22-using-getpostedattribute-to.html

    Dario

  • Need to fill out the field of text based on the selection after pressing an event in the OPS

    Dear all,

    I have a requirement as below

    I have a table of tip having a LOV field and I have a button to add a line so that I can add a row more lov field and after I am pressing a button to insert the LOV data into a table, my requirement is in the top of the page that I have text field, I have to fill the selected values of LOV in below format in this area.

    EX:

    Table of the advance:

    Row1:ABC

    Row2: DEF

    In the text field, I need ABC-> DEF in this format after pressing a button, and that the value should insert into the table in this form, please help me on this

    Thnaks

    Hello

    Advanced table: (SEE: SampleAdvnacedVO)

    RowNo ColLovValue

    1 ABC

    DEF 2

    Create an OAMessageTextInputBean (Id - ValueItm) and

    Set Property Render ${oa. RenderVO1.Render} with initial value as a BOOLEAN. FAKE.

    Button: Send

    Create a partial fire Action by clicking on the "submit" button

    Code central:

    Of the PFR:

    {if ("submitClick". Equals (PageContext.GetParameter (EVENT_PARAM)))}

    am.invokeMethod ("executeRenderVO");

    OAViewObject vo = am.findViewObject("SampleAdvnacedVO1");

    Line = vo.getAllRowsInRange ();

    String value = null;

    SampleAdvnacedVORowImpl voRow = null;

    for (int i = 0; i)< row.length;="">

    {

    voRow = rank (SampleAdvnacedVORowImpl) [i];

    value = value + "-->" + voRow.getColLovValue ();

    }

    System.out.println ("values-" + value);

    OAMessageTextInputBean valueItmBean = (OAMessageTextInputBean) webBean.findChildRecursive("ValueItm");

    valueItmBean.setValue (value);

    }

    GOT the Code

    public void executeRenderVO() {}

    OAViewObject vo = getRenderVO1();

    vo.executeQuery ();

    vo.insertRow (vo.createRow ());

    Line OARow = (OARow) vo.first ();

    row.setAttribute ("to make", Boolean.TRUE);

    }

  • Fill in the field of text based on the menu drop down.

    Here's the scenario: I have 2 drop-down lists on page 1 (list1, List2). Based on this selection, I want to fill in a text field on page 2 with their values, after clicking on a button to update at the bottom of page 2. I use the button click event, but how can I get the actual values of each drop-down list on the previous page?

    You must give the full path to the objects (i.e. form1. Page1.DDListName.RawValue). look in the view hierarchy to see the structure you want. Conversely, you can place the cursor in the script editor where you want the reference to appear, hold done the key ctrl and move the mouse to the object you wish to reference (it will change into a V). Then click on the mouse and the appropriate for this object reference is displayed in the script editor.

    Paul

  • change the field type selection list of text based on the data in the other domain.

    Hello

    We have a requirement where we are looking to display the page as element select list or a free text field based on the value of the item to another page.

    Say, we have two fields

    Day:

    Products:

    If day = 'Monday' produced a drop in low field of another product would be a free text field.   Is this possible in APEX?

    This is the configuration I did.

    I used the field produced twice (as a text and list field select) as an element of a page., dependent on the value of the day I used the dynamic properties of actions to show/hide these fields.

    However, when I click on submit, it throws an error:

    ORA-06550: line 1, column 108: PL/SQL: ORA-00957: name of column in double ORA-06550: line 1, column 13: PL/SQL: statement ignored


    Kind regards

    Satya

    You can have both share the same database column, the process of the APEX DML does not know how to consolidate.

    You will need to add a calculation and determine the real value based on two fields, up to an only one mapped to db.

  • Trigger to run the query when the value of LOV is selected

    HI guys,.

    I have a form in which I have 2 fields in Master and 4 fields in detail, showing all on the same canvas.
    I put a "execute_query" in when_new_form_instance trigger so that when I open the form it is pre - filled.
    The fields get the values LOVs. I want to run the master block query when the user selects a value in LOV, then in what trigger should I put it.
    I tried in 'when_validate_item' and 'when_list_changed' triggers, but it showed an error.
    So, what should I do?

    Concerning

    Ranjan

    user8664136 wrote:
    I want to run the master block query when the user selects a value of LOV

    If master block (header) is based on the table, using LOV without pressing enter_query firstly, update existing record.
    Here's my version (Andreas, sorry, I used your code :))

    TO KEY-LISTVAL:

    DECLARE
         tm TIMER:=FIND_TIMER('TM_QUERY');
    BEGIN
      IF ID_NULL(tm) THEN
        tm:=CREATE_TIMER('TM_QUERY', 1, NO_REPEAT);
      END IF;
      ENTER_QUERY;
    END;
    

    In WHEN-TIMER-EXPIRED:

    IF SHOW_LOV('LOV') THEN
     EXECUTE_QUERY;
    END IF;
    
  • How cascade/fill out the value of a column in a table?

    Hello

    I am begging in the oracle apex,

    Now I use 5 Apex


    Capture.PNG

    I want to select when point items popup lov (1) ... I want to get auto fill in the balance column .


    Please help me with the steps...

    Thank you.



    Hi Amr Abdeen,

    Made some changes to the page not 34

    1. remove the code button to add a line

    $("#f03_0001").attr ("onchange", "javascript:f_fetch_balance (this)");

    It is not necessary.

    2. convert key lov Popup to popup lov (Query based)

    Now it's working.

    Please check and let me know if you have any questions.

    Kind regards

    Jitendra

  • Retrieve selected the value of LOV

    Hi friends,

    I have a query on the value selected LOV.

    I have two fields in my form called Dimension and indicator. We have the table associated with these two fields, DIMENSION_TABLE and INDICATOR_TABLE.

    The field two Dimension and indicator are filling the table DIMENSION_TABLE and INDICATOR_TABLE lov. Assume that the user has selected 'ABC' as a value

    dimension field LOV and 'XYZ' indicator field lov. Before submitting this user page is by clicking the search button in the page of the form. Then click on the button Search

    a pop up window should open that list down the records of database on the basis of LOV of Dimension selected and indicator which is submitted allread. ex: id-1 indicator of Dimension-ABC-XYZ, id-2 size-ABC indicator-XYZ, id-3 Dimension-ABC indicator-XYZ. Like this.

    Need help on this. Thanks in advance

    Concerning

    You want the whole 9 yards after all.

    Your Page 8 application should look like

    select dimension_table.dimension, dimension_table.indicator
    from dimension_table
    where dimension like nvl(:P8_DIMENSION,'%')
    and indicator like nvl(:P8_INDICATOR,'%')
    

    In the calling Page (say 1) that has the lists to select, on the second lists (supposed P1_INDICATOR) add the following line to the attribute of the element

    onchange="setVal();"
    

    In the call header pages updated HTML code below

    
    

    Now, create an OnDemand application process and insert the following code into it

    declare
      p_x01  varchar2(1000) := apex_application.g_x01;
      p_x02  varchar2(1000) := apex_application.g_x02;
    begin
      :P8_DIMENSION := p_x01;
      :P8_INDICATOR := p_x02;
      htp.prn('');
    end;
    

    You may experience problems of closure of the modal popup. For soolution search this forum.

    Kind regards

  • Element of change based on the value in LOV

    I'm trying to disable the item (text box), based on the value of the LOV. And it doesn't seem to work.

    Is it possible to see what is happening in the level of the events? The LOV is perhaps not "changing" ing?

    Dynamically change the item values

    Patrick Wolf-Oracle responded to the question - get the firebug.

    Looking at the console I discovered that the returned of LOV value includes spaces. Resolved issues.

  • Quirk of shuttle - not filling all the values

    APEX 4.1

    Oracle 11g

    I have a form where you Select a Department, P37_PROD_DEPT_CD, select list

    Always replace any existing value in session state

    Static assignment

    < code >

    Select PROD_DEPT_CD. ' ' || PROD_DEPT_NM d, PROD_DEPT_HIER_CD r

    of PRODUCT_DEPARTMENT

    WHERE PROD_DEPT_CD! = « -1'

    order by 1

    < code >

    Now, select a unit, P37_PROD_SUBDEPT_CD, shuttle

    Always replace any existing value in session state

    Static assignment

    < code >

    SELECT prod_subdept_hier_cd. ' ' || prod_subdept_nm d, PROD_SUBDEPT_HIER_CD r

    Of apnew. PRODUCT_SUBDEPARTMENT

    WHERE prod_dept_cd in (select substr (column_value, 1, 3) OF TABLE (util.split (: P37_SUBDEPT_CD_HIDDEN, ' :'))))))

    AND PROD_SUBDEPT_CD not in ('888')

    ORDER BY d

    < code >

    Where

    P37_SUBDEPT_CD_HIDDEN

    Always replace any existing value in session state

    Source = P37_PROD_SUBDEPT_CD element

    Returns:

    dr
    936-237 OUTDOOR GAMES/TAILGATE936 237
    LARGE TRAMPOLINES 936-239936 239
    COOLERS OF 936-278936 278
    GRILL THE 936-279936 279
    FURNITURE OF 936-281936 281
    SHELTERS OF 936-287936 287

    Now, select a class,  P37_PROD_CLASS_CD, shuttle

    Always replace any existing value in session state

    Static assignment

    < code >

    Select PROD_CLASS_HIER_CD. » '|| PROD_CLASS_NM d, PROD_CLASS_HIER_CD r

    of PRODUCT_CLASS

    WHERE instr (: P37_PROD_SUBDEPT_CD, prod_subdept_hier_cd) > 0

    order by 1

    < code >

    Copy the following code returns a class for all values except coolers 936-278.

    When I run the code in the database using the value of the Subdirectorate of the 936-278, it returns what follows, but not in the APEX.

    dr
    936-278-135 PERSONAL COOLERS < 20QTS936-278-135
    936-278-136 LICENSED TEAM COOLERS936-278-136
    936-278-140 FAMILIES COOLERS 20QTS +.936-278-140
    936-278-145 SIDE SOFT COOLERS936-278-145
    936-278-150 THERMO ELECTRIC COOLERS936-278-150
    936-278-155 ACCESSORIES COOLERS936-278-155
    936-278-160 JUGS936-278-160
    936-278-163 COOLERS SAILORS936-278-163

    I'm puzzled.  There are no filters, I tried adding trim to return and where clause branch in the selection of the class.  Debug display any errors.  Firebug shows the correct value in the DOM.

    Someone at - it see this behavior?  How can I get this one class to fill in the shuttle?

    Finally have a chance to come back to this question.  It seems that you were right with the LOV cascading.  Page elements to be submitted was the culprit.  It has been set on the wrong item and when I change to the cd of the class, it fixed the problem.  It's still weird compared to the other subdivisions.  When you highlight in the shuttle left subdepartment, the values of class for everything except my a problem child still appear.  After the LOV, they still don't appear that by moving the right shuttle the subdepartment.  But at least they appear now.  Thank you.

  • Property of hierarchy DRM: EPMA. SharedDimension - how to get it filled with the values?

    We have a hierarchy of DRM, we want to push to a Dimension of sharing EPMA. In DRM, selecting the hierarchy and by changing the 'Dimension' shared property, the drop-down list box previously had values in there (some have been our shared Dimensions EPMA, but several us not the Shared Dimensions) but no longer has any selectable values. How do we get DRM to sort the list of the Shared Dimensions of our EPMA instance in the drop-down list of properties shared Dimension?

    Hello

    I could be wrong completely here, but that's what I discovered trying to look for EPMA. Property of SharedDimension.

    This property gives me drop-down list without having to do anything and the drop down menu is the list of groups available in hierarchy, but if I'm putting some values manually in the definition of ownership--> the list of values is not showing me all the values (list of groups of hierarchies and not the value created manually) in the drop-down list.

    I think that this property will not take a different list than list of group hierarchy as the Data Type defined for that property in the model of the APP is "Group of the hierarchy". Once again this property is used in the export "EPMA. E.M.P. architect Shared Library"to penetrate the hierarchies EPMA Shared Library.

    Then you can try to see if all values are entered in the definition of the property--> list and try to delete it OR to check if the required groups in the hierarchy are created in consequence.

    Let me know if it helps

    Thank you

    TFDC

  • How to fill in the value of the MULTISELECT downtown SHUTTLE point

    Hello

    I have 2 items

    P1_TEXT1 - multiple selection
    P1_TEXT2 - shuttle

    I have populated the value of P1_TEXT1 (multiselect) and you want to assign the same value to P1_TEXT12 (shuttle)
    I use the following Javascript function to assign the value of P1_TEXT1 to P1_TEXT2, but it does not work?
    $x('P1_TEXT2').value = $x('P1_TEXT1').value
    Thank you
    Deepak

    Published by: Deepak_J on December 4, 2009 15:28

    Hello

    I think it's ok. I don't see a problem.
    You can do bit shorter by removing a few lines that you declare the g_myShuttle variable start code.

    
    
    Br, Jari 
    
  • Assign the value of LOV to point

    Hello
    I use form6i.
    In my form, I have a block db with 2 columns 'sector' and 'reference '.
    But in the layout I only show 'sector '.
    I need to create a table sector_master lov, that should poupulate corresponding sector and refernce.
    But I don't want to see the column reference in the lov, because in this screen reference column is not displayed. That is to say I should fill in the reference column internally based on the selected sector.

    I know that I can do using select stmt in the Organization of the sector, but is there a way to fill directly lov?

    in the property column of the LOV map: try setting the display to 0 width.

  • How to read the value of LOV...

    Hello.
    I'm new to OFA. I have a following problem
    In Jdevloper I created the OFA project. In what I messageLOVInput a field id is PONumber. When the user clicks on torch a LOV page is open and user search on this subject. When the user clicks a line any number LOV then PO is added to the PONumber field. I want to read this value when the user clicks on the button "submit" a stored procedure is called and the number of PO is closed.


    Concerning
    Ajay Sharma

    Hi Ajay,

    You can get the selected value of LOV in many ways, this is one of the most simple ways:

    -----
    msgLOVInputId is the Id of your LOV value bean ID.
    String strLovValue = pageContext.getParameter ("msgLOVInputId");
    -----

    You can write in the method ProcessFormRequest and look for the value.

    Kind regards
    Swati

Maybe you are looking for