How to update one lov based on value selected from another lov.

Hi ,
I have a form in which I created the 2 LOVs for my event_date field and event_name field each which is stored in one table.
t I want to update the event_date LOV everytime event_name is selected.
How can I achieve this.
Thanks.
Neeti.

Hi,
You can do this using dynamic LOVs. Here are the steps for populating a employee LOV on selecting a department.
1) Create a dynamic lov say emloyee_lov with a bind variable like this
select empno,ename from scott.emp
where deptno = :dept
2) Create a form on scott.emp.
3) In the empno field which should be a LOV type of field, associate it with
the above employee LOV.
4) Then set the binding(s) for the bind variable(s) defined in the lov by
selecting the deptno column.
This would help.
Thanks,
Sharmila

Similar Messages

  • Update one row based on a row from another table

    Hi,
    I have two tables which are having the same field but with a different name.
    CREATE TABLE FAVE_CODE2_NEW_JOIN
    BANKID VARCHAR2(5 BYTE) NOT NULL,
    CUSTOMERID VARCHAR2(12 BYTE) NOT NULL,
    SIXID VARCHAR2(12 BYTE) NOT NULL,
    FAVCODE VARCHAR2(13 BYTE),
    IDX NUMBER(5),
    DEFAULTT NUMBER(1)
    TABLESPACE PORTFOLIO_FAVORITE
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    NEXT 1M
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    CREATE TABLE SUBSCRIPTION
    SUBSCRIPTIONID RAW(16) NOT NULL,
    APPID VARCHAR2(64 BYTE) NOT NULL,
    DEVICEID VARCHAR2(64 BYTE),
    SUBSCRIBERID NUMBER NOT NULL,
    TIME_REGISTERED TIMESTAMP(6) DEFAULT SYSTIMESTAMP NOT NULL,
    TIME_LAST_USED TIMESTAMP(6) DEFAULT SYSTIMESTAMP NOT NULL,
    SUBSCRIPTION_TYPE VARCHAR2(30 BYTE) NOT NULL,
    SUBSCRIPTION_INFO VARCHAR2(512 BYTE)
    TABLESPACE PORTFOLIO_FAVORITE
    PCTUSED 0
    PCTFREE 10
    INITRANS 1
    MAXTRANS 255
    STORAGE (
    INITIAL 64K
    NEXT 1M
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    PCTINCREASE 0
    BUFFER_POOL DEFAULT
    LOGGING
    NOCOMPRESS
    NOCACHE
    NOPARALLEL
    MONITORING;
    SUBSCRIPTION_INFO in SUBSCRIPTION is equal to SIXID in FAVE_CODE2_NEW_JOIN. They have the same value
    In FAVE_CODE2_NEW_JOIN table there is also a FAVCODE filed.
    Now i want to find out the record from VE_CODE2_NEW_JOIN which are having the same sixid like SUBSCRIPTION_INFO in SUBSCRIPTION and then replace that SUBSCRIPTION_INFO with the value in FAVCODE
    Here are some sample from both tables:
    SUBSCRIPTION:
    B31E5F5D3CB6     RIe9pnbe7BtA8IuQ     BB2-58CA815F9958     21     2012-01-10 19:18:39     2012-01-11 12:24:04     FT     FSB0650444
    010FB3AE74AE     RIe9pnbe7BtA8IuQ     845-AD375E95ED90     21     2012-01-12 08:31:47     2012-01-24 08:53:09     FT     FSB0650444
    6119E731A26F     RIe9pnbe7BtA8IuQ     76A-DAD2E359BF3F     113     2012-01-04 00:25:05     2012-01-19 16:17:21     FT     FSB0632948
    FAVE_CODE2_NEW_JOIN:
    08999     191111111111     FSB0650444     SWB0553263     11     0
    As you see they both have the same 'FSB0650368' but i want to replace this code with the corresponding FAVCODE in FAVE_CODE2_NEW_JOIN which is 'SWB0553263'.
    I hope you have got what i mean, please tell me to explain more if you have any problem to understand what i mean.
    Many thanks in Advance!
    / Hesam

    Hesam wrote:
    hi,
    I'm trying this code:
    update subscription a
    set a.subscription_info =
    select b.favcode
             from fave_code2_new_join b
            where b.sixid = a.subscription_info
    where exists
    select b.favcode
             from fave_code2_new_join b
            where b.sixid = a.subscription_info
    )but its taking a lot of time. Until now 10 minutes and lots of presure on the CPU!!
    Can we optimize this or its just due to the number of records?
    Edited by: Hesam on Mar 25, 2013 3:01 PMSo now you are getting into performance issues?
    I would suggest you read {message:id=9360003} and post the necessory details so that we can see what can be improved and how.

  • Infopath: How to load data in one field based on value selected in another field

    We have a drop down list field in the infopath form and we have some more fields that should change depending on the dropdown selection. 
    How can we achieve this please ?
    Thank you !

    Hi Prajk, sounds like you want to do cascading dropdowns. If so, see the link below. If you're just trying to enter information into a field (not a dropdown) based off the value of the dropdown, then set a rule so that if dropdown = "this," set
    the field's value to "this."
    http://blogs.msdn.com/b/bharatgupta/archive/2013/03/07/create-cascading-dropdown-in-browser-enabled-infopath-form-using-infopath-2010.aspx
    cameron rautmann

  • How to update one table based on another table ??

    Hello Friends:
    I am trying to run the following query in oracle but it won't run.
    UPDATE BOYS
    SET
    BOYS.AGE = GIRLS.AGE
    FROM GIRLS
    WHERE
    BOYS.FIRSTNAME = GIRLS.FIRSTNAME AND
    BOYS.LASTNAME = GIRLS.LASTNAME;
    This query runs fine in sql server but in oracle its saying can't find "SET". PLease tell me what is the correct syntax in oracle to update one table based on another table.
    thanks

    See if this helps.
    If you wrote an SQL statement:
    update boys set age = 10;
    Every row in the boys table will get updated with an age of 10. But if you wrote:
    update boys set age = 10
    where firstname = 'Joe';
    Then only the rows where the firstname is Joe would be updated with an age of 10.
    Now replace the 10 in the above statements with (select g.age from girls g where g.firstname = b.firstname and g.lastname = b.lastname) and replace where firstname = 'Joe' in the second statement with where exists (select null from girls g where g.firstname = b.firstname and g.lastname = b.lastname). The same concepts apply whether 10 is an actual value or a query and whether you have a where clause with the update statement to limit rows being updated.
    About the select null question regarding the outer where clause:
    Since the query is checking to see if the row in the girls table exists in the boys table what the column is in this select statement doesn't matter, this column isn't being used anywhere. In this case Todd chose to use null. He could have also used a column name from the table or a lot of times you'll see the literal value 1 used here.

  • Cond display of drop down based on value selected in another drop down form

    Hi,
    I have a requirement in my app in which I need to be able to conditionally display the values in the drop down down list based on the values selected in another drop down list...
    Currently I have 2 drop downs.
    First drop down is a list of Jacks from 2000 to 4999...
    Second Drop down consists Chassis ranging from 1 to 900..
    So when a user selects any jack between 2000 - 2999, in the second drop down only Chassis ranging from 1 to 300 should appear.
    when anything between 3000 - 3999 is selected, Chassis ranging from 301 to 600 should appear..
    and for jacks between 4000 - 4999, Chassis ranging from 601 to 900 should appear in the second drop down.
    Can someone please provide me pointers on how to do this..
    Thanks,
    Nehal

    Hi Larry,
    Thanks for your response..
    Here are the queries for my select lists.
    P62_JACK
    select list query for Jacks:
    select JACK_NUM display_value, JACK_NUM return_value
    from CTS_LIST_OF_JACKS
    order by 1
    P62_CHASSIS_BLADE_PORT
    select NETWORKPORT display_value, NETWORKPORT return_value
    from CTS_LIST_OF_NETWORKPORTS
    order by NETWORKPORT_ID
    jacks range from 2000 to 4000
    chassis_blade_port ranges from 100 to 900...
    Can you please let me know how to do it..
    Thanks,
    Nehal

  • Update vs Merge - Updating one table based on values in another

    Hello
    I have two tables lets say TAB_A and TAB_B. I altered table B to include a new column from table A
    I wrote a merge statement as follows to merge the data
    MERGE INTO TAB_A
    USING TAB_B
    ON (TAB_A.SECURITYPERSONKEY=TAB_B.SECURITYPERSONKEY)
    WHEN MATCHED THEN
      UPDATE SET TAB_A.PPYACCOUNT=TAB_B.PPYACCOUNT;
    I know INSERT is for inserting new records
    UPDATE to my knowledge is to modify currently existing records (loosely)
    MERGE is one I rarely used, until this particular scenario.
    The code works perfectly fine, but I was wondering how could I write an update statement? Or in this scenario should I even be using an update statement?

    The MERGE is good and performs well, although it malfunctions (sometimes updating data wrongly) if the destination is a view with INSTEAD OF triggers.
    The UPDATE with similar performance to the MERGE depends on SECURITYPERSONKEY being a unique or primary key on TAB_B. It is:
    update (select TAB_A.PPYACCOUNT a_PPYACCOUNT, TAB_B.PPYACCOUNT b_PPYACCOUNT
            from TAB_A JOIN TAB_B on TAB_A.SECURITYPERSONKEY=TAB_B.SECURITYPERSONKEY)
    SET A_PPYACCOUNT=B_PPYACCOUNT;
    This can set multiple columns. It also currently doesn't work on a view with INSTEAD OF triggers.
    Frank's update also works with multiple columns (eg also updating col2 and col2), with this syntax:
    UPDATE  tab_a
    SET     (ppyaccount, col2, col3) = (
                             SELECT  ppyaccount, col2, col3
                             FROM   tab_b
                             WHERE  securitypersonkey  = tab_a.securitypersonkey
    WHERE   EXISTS       (
                             SELECT  ppyaccount
                             FROM    tab_b
                             WHERE   securitypersonkey  = tab_a.securitypersonkey

  • Dynamically set a value based on value selected from LOV

    Apex 4.2
    I'm having trouble creating a dynamic action to set a value. I've used dynamic actions to hide and show regions but for some reason cannot set a value.
    I have a select list  --> P101_LIST. Source Type is 'Database Column'. Source value or expression is 'person_id' The query is as follows:
    Select first_name, person_id
    From Persons
    I have a display value --> P101_DISPLAY. Source Type is 'Static Assignment'. Source value or expression I left blank.
    I would like for every time the user selects a name from P101_LIST, the P101_DISPLAY item gets updated to show the corresponding value(person_id).
    Because there are other page items / information on the page, I would prefer this to not submit / update the page. Wouldn't want other page items / information getting updated.
    Any help on this matter would be greatly appreciated. Thanks in advance.

    Hi,
    Create a DA:
    - event onChange P101_LIST
    - Action: PL/SQL
    - PL/SQL code:
    :P101_DISPLAY := :P101_LIST;
    Items to submit: P101_LIST
    Item to return: P101_DISPLAY
    And done.
    Regards,
    Joni

  • Is there a way to fill a cell with a value based on the selection from another cell?

    For example: If have a drop down menu created for Cell A1 with options (Dog 1, Cat 2, Bird 3). Is there a way to fill cell A2 automatically when I select from the drop down menu.
    So if I selected 'Cat' in A1, cell A2 would automatically input the 2.

    I suggest an extensible method that allows you to add other animals:
    This method adds a small table called "Animal Lookup" that matches names (same as in the pop-up menu) with a value.
    The table on the left uses this table to retrieve the value based on the animal:
    B2=VLOOKUP(A2, Animal Lookup :: A:B, 2, 0)
    select B2 and fill down

  • How to populate a dropdown based on the selection from a previous dropdown?

    I am currently trying to build a spreadsheet with three different dropdown menus to choose from.  Based on what is selected from the first drop down though affects what choices are displayed for the next dropdowns.  Is this possible in Numbers? Or should I look for other alternatives for what I'm trying to do.

    Dynamic dropdown (pop-up) menus is not possible in Numbers directly.  If you use scripts you may be able to cobble something together.
    If you REALLY want pop up menus then place ALL the choices in a single pop up grouped together

  • Setting current row of a view based on row selected from another view.

    Hi,
    We have two Views V1 and V2. Both views are based on the same tables except that V1 is based on multiple tables. In our application we are showing a read only table which is based on V1. The user can select a particular record for edit. But the edit page is based on V2 and as a result the first record always shows up for editing even though the user may have selected another record.
    Is there a way we can pass the primary key of the record selected from V1 to V2 and set that record as the current record.
    We have tried setCurrentRowWithKey, but this did not help.
    Regards
    RHY

    Hello,
    post the PK as an URL parameter within the link you open the edit page. Then read this parameter in your page (the page with this link) action class and send it to an ActionBinding:
    JUCtrlActionBinding action = (JUCtrlActionBinding) bc.findCtrlBinding("nameOfBinding");
    ArrayList arrayList= new ArrayList();
    arrayList.add(0,primaryKey);
    action.setParams(arrayList);
    action.doIt();
    In your AppModule create a method nameOfBinding with primaryKey as in parameter
    public void nameOfBinding (Number primaryKey )
    getV2().setWhereClause("PRIMARY_KEY=:0");
    getV2().setWhereClauseParam(0,primaryKey );
    getV2().executeQuery();
    In the AppModule you have to publish this method in "ClientInterface".
    Create an Action binding for this method in your list jsp.
    Hope this helps
    Britta

  • How to change the values in an LOV based on values selected in another LOV

    Hi,
    I have a requirement in ADF where there are two LOVs. Based on the values that I select in the 1st LOV, the values in the second LOV should change dynamically.
    Also, the 1st LOV accepts 3 values, for every value I select, a different query is executed to populate the 2nd LOV.
    I have a rough thought that I can use 3 different read only view objects containing these 3 queries. And based on the value I select in the 1st LOV I can execute the corresponding View object from the backing bean. But my doubt is how to link the results of that query that is executed to populate the 2nd LOV.
    Thanks in advance.
    Edited by: 886591 on Sep 21, 2011 4:48 AM

    Hi Brisk,
    Thanks for your reply.
    The link that you have provided explains how to disable and enable the other LOVs based on a parent LOV. But in my case there are two Select One Choice fields i.e. the dropdowns (sorry that I addressed it as LOV in my previous post which might be confusing). There are 3 static values in the parent dropdown where each of them are associated with a different query. for e.g if the three values in the drop down are A, B and C; if i select A, then query associated to A should be executed ; if i select B, then query associated to B should be executed and if I select C, query associated to C should be executed. Then the output attribute of that query should be populated in the child dropdown.
    Please let me know about the solutions to this.
    Thanks,
    Kavitha

  • Help to set value of an attribute based on value selected in another field

    Hi all,
    I want to set the value of an attribute STRUCT.ITM_TYPE to a default value whenever i select one of the value from dropdown list in LC_STATUS.
    I tried to add an event in the get_p method of the lc_status but there i cant able to access the context of the ITM_TYPE as the fields are in different views.
    Please Help,
    Rewards will be awarded.
    Naveenn

    Hi Vineet,
    Thanks for the suggestion.
    Please chech my code and suggest me for any corrections.
    In the Get_P_LCSTATUS method of Context Node BTADMINH in View1.
    METHOD GET_P_LCSTATUS.
      CASE iv_property.
        WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
          rv_value = cl_bsp_dlc_view_descriptor=>field_type_picklist.
        WHEN if_bsp_wd_model_setter_getter=>fp_server_event.
          rv_value = 'ACT_STATUS_SELECTED'.
      ENDCASE.
    ENDMETHOD.
    In event handler method in Context Node BTADMINI in View2
    method EH_ONACT_STATUS_SELECTED.
    * Added by wizard: Handler for event 'ACT_STATUS_SELECTED'
    data: lr_ent1 type ref to cl_crm_bol_entity,
             lr_ent2 type ref to cl_crm_bol_entity.
    lr_ent1 = me->typed_context->BTADMINH->collection_wrapper->get_current( ).
    check lr_ent1 is bound.
    * To Get Value of First Attribute
    lv_attr1 = lr_ent1->get_property_as_string( 'LC_STATUS' ).
    * To Set Value of 2nd Input Field now based upon this value
    lr_ent2 = me->typed_context->BTADMINI->collection_wrapper->get_current( ).
    *lr_ent2->lock( ).
    lr_ent2->set_property_as_string( iv_attr_name = 'ITM.TYPE'  iv_value = 'RREQ' ).
    endif.
    endmethod.
    but during syntax check its showing error messge as BTADMINH is unknown.
    2) How and where to bind the context node in custom controller.
    Please help.

  • Set default values for StartMonth and EndMonth Parameter based on value selected from the previous parameter(Not cascading)

    I have a scenario where it has multiple parameters like.....
    Period which consists of "Year,Quarter,Month" as a values.
    When user selects "Year" value in "Period" Parameter then "FromMonth" has to set its default value as 36th month from now.
    Example: If user selects "Year" then "FromMonth" has to show "April-11".
    When user selects "Year" value in "Period" Parameter then "EndMonth" has to set its default value as current month.
    Example: If user selects "Year" then "FromMonth" has to show "March-14".
    If user selects "Month" Value in "Period" Parameter then it has to allow user to select the Month Range and again if user selects "Year" value in "Period" Parameter then StartMonth has to show 36th month from now and
    End Month has to show current month.
    Please help me how to resolve this issue.
    Thanks in Advance.

    Hi  Vasu_479,
    First, you need to create a dataset to set the StartDate and EndDate parameter's value using the query provided by Visakh. And then use the StartDate and EndDate parameter to filter the data in MDX query. Here is a sample query for your reference.
    select
    {[Measures].[Internet Sales Amount]
    } on columns,
    {[Date].[Date].members} on rows
    from(
    select
    STRTOMEMBER("[Date].[Date].&["+@StartDate+"]"):STRTOMEMBER("[Date].[Date].&["+@EndDate+"]")
    ) on columns
    from [Adventure Works]
    Hope this helps.
    Regards,
    Charlie Liao
    TechNet Community Support

  • Disable fields based on value selected from first list box.

    Hi All,
    I am facing a problem in module pool programing. My scenario is there will be around 50 fields in the screen  , within that first field is a drop down list box. In the list box there will be electricuty , gas and csw. If user select gas then the fields corresponding to gas will only be editable other fields not relevent to gas will be non editable(Disable).... Same case for electriciy andcsw also.
    Can any one guide me regarding this....
    Thanks in advance.
    Regards
    Ajoy

    Hi Asaha,
    This link will be of great help for you if you are new to Module pool.
    [Module Pool Notes|http://wiki.sdn.sap.com/wiki/display/Snippets/ModulePoolNotes]
    For [DYNP_VALUES_READ|http://wiki.sdn.sap.com/wiki/display/ABAP/FilteringF4HelpvaluesinTablecontrol,basedonotherfield+value] refer this link.
    For [DYNP_VALUE_UPDATE|http://wiki.sdn.sap.com/wiki/display/ABAP/GettingainputfieldpopulatedonenteringthevalueinoneInputfield]
    Regards
    Abhii

  • How to update one row in AdvancedDataGrid

    My App have a AdvancedDataGrid and it has so much rows. Some
    data rows for AdvancedDataGrid has changed and i don't want to
    update all rows ... But i don't know how to update one row for my
    AdvancedDataGrid
    Some body help me ...
    Thanks so muchs !

    thanks ntsii.
    my problem is:
    [Bindable]
    var dp:ArrayColection = new ArrayColection({...});
    <mx:AdvancedDataGrid dataProvider="{dp}">
    <mx:groupedColumns>
    </mx:groupedColumns>
    </mx:AdvancedDataGrid>
    //==================================
    in my dp have more rows and some time one of them is changed
    then i guess the AdvancedDataGrid must build all rows when
    it's dataProvider (dp) have changed.
    And i don't want to that...
    But i am not sure the AdvancedDataGrid buld all rows from
    begin to end ... i don't know.. !

Maybe you are looking for