Oracle ADF Populate Drop Down based on Parameter

Hi All,
I have been struggling with a scenario where we want the values in a drop down to be limited based on something specifc....so for instance the users department ID. If that value exists in the view object that is displaying the data and where I will have my LOV it works fine to restrict the LOV based on the user's department id.
However, if that value isn't in that view object we are using to display the form values along with the LOV then I can get the value listing to be restricted. I have tried execute with params and a few other things (This works to restrict data on the page, but not the LOV).
Any tips on how I can restrict an LOV based on a value that is not in the current VO would be great.
Thanks,
S

Frank,
I Found your previous example and it worked like a charm thanks.
Put this in the view accessor like you said and it did what I wanted: adf.source.applicationModule.findViewObject('departmentsInLocation').currentRow.DepartmentId
--S                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • How to populate Second drop down based on the first drop down value

    Hi Experts,
    i have a HTML BSP page. with 2 drop down with SELECT and OPTION tags. i need to populate the second drop down based on the first drop down value.
    i tried HTMLB script they work good as stand alone when i try to embed the HTMLB with HTML it does not work.
    Please can you give me a solution only with ABAP script and HTML.
    please clearly let me know on what event i should implement it. sample code is really appreciated .
    With regards,
    Chella

    You can have event handler for first drop down . Then populate the data for 2nd field when the event triggers on first field.

  • How to get value in Second Drop Down based on selection made in first dropd

    Hi All,
    I have a table with first two columns as dropdown.
    The values in first drop down are fixed. However the value in second dropdown should be populated based on selection made in first .
    e.g
    First Column had different departments say IT, SALES, HR.
    Based on department selected I have to populate employee of that department.
    For first dropdown I have taken Drop down by index.
    What should I select for second drop down and achieve desired functionality? Please guide.
    Regards,
    Madhvika

    Hi
    Use drop down by key for fixed values IT, SALES, HR. create on_select action for that drop down.
    in on_select method code like this..
      DATA lo_nd_segment1 TYPE REF TO if_wd_context_node.
      DATA lo_el_segment1 TYPE REF TO if_wd_context_element.
      DATA ls_segment1 TYPE wd_this->Element_segment1.
      data lt_segment1 type wd_this->elements_segment1.
      DATA lv_segment TYPE wd_this->Element_segment1-segment.
      data lr_column type ref to cl_wd_table_column.
    navigate from <CONTEXT> to <SEGMENT1> via lead selection
      lo_nd_segment1 = wd_context->get_child_node( name = wd_this->wdctx_segment1 ).
    get element via lead selection
      lo_el_segment1 = lo_nd_segment1->get_element( ).
      lo_el_segment1 = WDEVENT->GET_CONTEXT_ELEMENT( 'CONTEXT_ELEMENT' ).
    get all declared attributes
      lo_el_segment1->get_static_attributes(
        IMPORTING
          static_attributes = ls_segment1 ).
    now ls_segment1 contains your first drop down selection value.
      DATA : lv_dropdown type string .
      lv_dropdown =  ls_segment1-segment.
      if lv_dropdown = 'IT'.
    // here fill your second drop down based on IT value.
    endif.
    Hope it solves.
    Cheers,
    Kris.

  • Want to hide the drop down based on text field value

    Hi,
    I want to hide some of the values in drop down based on one text field value.
    I have the field called name which has the value A, B, C, D and also one drop down list which has the values 1,2,3,4,5,6. I want to hide the some of the values in drop down based on A or B or C. Let say, If it is A, drop down value should be 1,3,5. If it is B, Drop down value should be 1,2,3,4. Like this for every record.
    Can you please help me out.
    Thanks
    Ram

    Hi Robert,
    I am trying it in two different way. Please suggest which is the right one and feasible.
    1) I have the drop down list which has all the status. I am trying to hide the drop down values based on one text field value for all records.
    2) I have collected all the drop down values into table in webdynpro method. Rightnow I have two tables.
      one has line items details and another one have drop down values. both tables having common fields.
      I have to show second table values for that particular key, move all of them to drop down.
    Which is the best and feasible option.
    Thanks
    Ram

  • How to populate drop down list in infopath 2010 with form Active Directory resources.

    I want to populate drop down list in infopath 2010 with Active directory resources.
    Kindly let me know how to do this.

    Actually I posted an alternative approach, whoops. This is the Web service way, but both will work;
    http://blog.mangroveweb.com/pre-populating-an-infopath-from-with-mysql-data-using-a-net-web-service/using-sharepoints-getuserprofilebyname-web-service-to-retrieve-ad-account-information/
    w: http://www.the-north.com/sharepoint | t: @JMcAllisterCH | YouTube: http://www.youtube.com/user/JamieMcAllisterMVP

  • Populate drop-down lists based on check box selections

    Hi. I'm creating a Service Work Order form. At the top, there are several check boxes for the various services we provide, under that , more text fields, drop downs and checkboxes to elaborate on those services, and then at the bottom, fields for pricing.
    I'd like the top half of the form to drive the pricing info that is available or that auto-populates at the bottom.
    Ideally, I'd like to make the pricing specific based on 3 things:
    the service checkbox
    the client
    and the details on that service
    For example:
    If Client XYZ wants Service A that includes subservice B
    $123 should show up on the bottom half in the field for that service
    If Client ABC wants Service B that includes subservice C
    $456 should show up on the bottom half in the field for that service
    Does that make sense?
    I've been unable to get code to work in either the calculate and pre-Open options
    I first tried calculate and used this code (which was just a guess on my part)
    if (CheckBox1 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 50
    elseif
    (CheckBox2 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 50
    elseif
    (CheckBox5 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 55
    elseif
    (CheckBox6 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 55
    elseif
    (CheckBox7 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 50
    elseif
    (CheckBox8 == 1) and if (CheckBox9 == 1) then
    $.rawValue = 50
    else
    $.rawValue = 0
    endif
    That didn't do anything but give me an error about "and"
    So I tried putting code in pre-Open:
    // clear the dropdown displayed value and items
    this.rawValue = null;
    this.clearItems();
    // repopulate the items based on the checkboxes
    if(offshore.rawValue == 1)
        this.addItem("$40.00", "offshore_001");
        this.addItem("$45.00", "offshore_002");
        this.addItem("$50.00", "offshore_003");
    if(inland.rawValue == 1)
        this.addItem("$40.00", "inland_001");
        this.addItem("$45.00", "inland_002");
        this.addItem("$50.00", "inland_003");
    I got no error but nothing populated and the drop-down was, in effect, disabled.
    Any help would be appreciated.
    Thanks!

    Gavin,
    This sounds like an issue that is not related to JHeadstart. To simplify the test case, you could create a simple drag-and-drop ADF application without JHeadstart and see if the same problem occurs there.
    Your suggestion that it is related to the where clause seems likely. Please find out what kind of object USER_ENV is, and how it is initialized. Maybe this initialization is skipped when bouncing the application.
    What happens if you perform the query in SQL*Plus, without doing anything about the USER_ENV?
    Maybe you should ask the Oracle Applications discussion forum...
    kind regards,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • How to populate ADF Faces Drop Down without Errors?

    Hi,
    I have a drop down in ADF Faces which gets populated when a value is selected in another drop down. And its mandatory that we need to select both the values from the drop down. Hence i have used the attribute 'required' and set it to 'true'. The code snippet is here.
    <af:selectOneChoice styleClass="selectOneClass" unselectedLabel="Pick One" inlineStyle="width:250px" accessKey="S" label="Site" id="siteDrop" disabled="false" rendered="true" required="true"
    requiredMessageDetail="Select a Value" value="#{QualityEvalBean.sites}"
    valueChangeListener="#{QualityEvalBean.siteValueChange}" autoSubmit="true" immediate="true">
    <f:selectItems value="#{QualityEvalBean.siteslist}"/>
    <!--f:selectItem itemLabel="White Field" itemValue="LEVEL4"/-->
    </af:selectOneChoice>
    <af:selectOneChoice inlineStyle="width:250px" unselectedLabel="Pick One" accessKey="T" label="Transaction Type" id="transDrop" rendered="true"
    partialTriggers="siteDrop" immediate="true" required="true" value="#{QualityEvalBean.transactionType}">
    <f:selectItems value="#{QualityEvalBean.transactionTypeList}"/>
    </af:selectOneChoice>
    While picking the value from the first drop down the second drop down is also getting validated and its giving a red colored icon beside the second drop down. There are absolutely no issues in case of populating the values in the second drop down.
    Please help me in this regard.
    Thanks
    Rahul Uday

    you can create a method to populate the context attribute that you are using to map to your dropdown box.
    DATA: node_info TYPE REF TO if_wd_context_node_info.
    DATA: it_table TYPE wdr_context_attr_value_list.
    ** select your dropdown data into it_table and pass it to your context attribute.
    ** here, mine is call PROJ_TYPE - the values should appear in your dropdown.
      node_info->set_attribute_value_set(
         name      = 'PROJ_TYPE'
         value_set = it_table ).

  • Need cascading drop downs based on non hierarchial attributes

    Post Author: Out of the box thinking
    CA Forum: WebIntelligence Reporting
    Using BO XI Web Intelligence.  I am trying to create multiple dropdowns to dictate the data input for a report.  The drop downs should include attribute values for products.  (EG: Color, Size, Flavor, Brand etc) these attributes do not follow a structured hierarchy and does not have a parent to child relationship.  I am trying to dictate the values that should be shown in all dropdowns based on the value selected in any drop down.  For example, if the user selects "Red" from the "color" drop down, Brand dropdown content should only include those brands that have "Red" products.  Similarly, "Flavor" dropdown should only show the flavors that has "Red" products.  These dropdowns should not be in the report body.  They should be in the left hand user control menu. 
    Is this something already available? If not, any work arounds?
    I appreciate any inputs. 

    Hi,
    First of all: if I understand you correctly, you do want your checkbox value to be available within the view object. If so, you need to make it a transient attribute of your VO and your checkbox must be databound to that attribute (you were talking about a non-databound item). Whether the item relates to anything in the database is irrelevant from a JHeadstart point of view.
    Your second question is actually an ADF related question, it has nothing to do with JHeadstart. In general I would say that you either update View Object attributes immediately when the flag is changed, or you do it in the Entity itself at Commit-time. What you are suggesting seems like an area for architectural improvement.
    Regards
    Evert-Jan de Bruin
    JHeadstart Team

  • Populate drop-down list from multiple text fields.

    Just to begin, I am brand new to this application and brand new to coding in general. Anyways, this is what I am trying to accomplish. I need to populate a drop-down list from multiple text fields. I am able to populate one item using this in the calculate event:
    TextField1.rawValue
    After I type text in TextField1 and hit enter, it displays the text in the drop-down list. I need to do this but with more than just one text field to populate more options for the drop-down list. I will also need to do something similar with populating a drop-down list from selections made in multiple other drop-down lists.
    Thanks for any help you can give me.

    Thank you for your suggestion Geo Kaiser. With that, I was able to populate my drop-down lists, but now when I select an option from the drop-down list, the selection dissapears. The selection will appear briefly in the box but then dissapears although my drop-down list options remain there. Here is the code I am using for my text field to drop-down list:
    DropDownList1.clearItems()
    DropDownList1.addItem(TextField1)
    DropDownList1.addItem(TextField2)
    And here is my code for my drop-down list to populate another drop-down list:
    DropDownList3.clearItems()
    DropDownList3.addItem(DropDownList1)
    DropDownList3.additem(DropDownList2)
    Thanks again for your help. By the way, I am using Adobe Designer 7.0.

  • Crystal report Chose from List or drop down value in parameter from UDT

    Hi Experts,
    I had face a issue while creating a report for my client in crystal report , I had create a report and in the parameter field I want to select the value from the chose from list or drop down value from the User define table.
    In parameter had written field as : Code@Select * from dbo. [@UDT] ;  but in the report filled I am not able to select the value.
    Please Help me ! Thanks in Advance. :

    HI
    Welcome to the Forum...
    You cannot put all the values in a single parameter field so you need to select each field for each parameter...
    Better you post it in this link for more reponses:
    Reporting and Printing

  • How to populate drop down list in infopath 2010 with form library column

    I created one column of choice type and have put 3 values on this column in form library in site.
    and one drop down list in form library at infopath 2010 but how to populate the dropdown in infopath populate with this column.

    Hi John, you should either add the values to your InfoPath dropdown manually or create a new list in SharePoint with the values and make a connection to that list to populate your dropdown.
    cameron rautmann

  • 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

  • To populate drop down in a table..

    Hi,
    In my Application i have a table populated from an EJB bean through a class[]....
    Node:GroupNode
    Attributes:user , name, location.
    User attribute is the dropdown field in table..
    below values are to be  poupulated in the dropdown of the table from the string array.
    String[] ca  = { "user1","user2","user3"}
    I am populating the table from my class...but i am not able to populate the dropdownbox...
    Below is the code i used to populate the table:
    UserDTO[] cat = wdContext.currentBeanElement.modelobject.Objuser();
    for(int i-0;i<cat.length;i++)
    IPrivateUserView.IGroupNodeElement e =  wdContext.createGroupNodeElement();
    e.setUser(cat<i>.getUser());
    e.setName(cat<i>.getNmae());
    wdContext.nodeGroupNode.addElement(e);
    When I use Textview element in the table UI , the values are populating..
    But I need the User column in DropDown...So when i change the UI element to Drop Down Box in User column in Table,the User Column in the table is alone empty..
    How can I populate the values in dropdownbox with  String[] ca  = { "user1","user2","user3"} ...
    And I am usin DropDownByIndex UI element...
    Thanx in advance...
    Arjun.G
    Edited by: arjun swamy on Jan 22, 2008 7:22 AM

    Hi 
    To populate a dropdown by key inside a table, you should do it this way:
    //YOURNODENAME card: 1..n selection: 1..n    ,  attribute within node,
    // it could be card: 0..n y  sel: 0..1, depend on your liking/mandatory
    //condition.
    IModifiableSimpleValueSet ValueSet= wdContext.getNodeInfo().
         getChild("YOURNODENAME").getAttribute("ATTRIBUTENAME").
         getModifiableSimpleType().getSVServices().
         getModifiableSimpleValueSet();
    //Fill dropdownbykey with data
    ValueSet.put("user1","user1");
    ValueSet.put("user2","user2");
    ValueSet.put("user3","user3");
    ValueSet.put("user4","user4"); //... etc.. fill to fit your needs
    //Fill table with independant copies, that means choosing one doesnt modify the others
    for (int i = 0; i<5 ; i++)
      wdContext.nodeYOURNODENAME().addElement(wdContext.nodeYOURNODENAME().createElement());
    Regards
    Julio Herrera

  • Populate drop down in a selection screen

    Hi All,
    I have created a selection screen where i have a drop down field .How do i populate the drop down? In the backend i have a table type in the export param. which contains all the drop downs values.
    Please help.
    Thanks
    tubai.

    Hi,
    If you are using drop down by index. then use following code. Create a context node with cardinality 1:N
    data : it_table type STANDARD TABLE OF sflight.
    DATA lo_nd_cn_drpindex TYPE REF TO if_wd_context_node.
    DATA lo_el_cn_drpindex TYPE REF TO if_wd_context_element.
    DATA ls_cn_drpindex TYPE wd_this->element_cn_drpindex. " Here cn_drpindex is the name of context node which is binded to the drop down by index UI element.
    * navigate from <CONTEXT> to <CN_DRPINDEX> via lead selection
    lo_nd_cn_drpindex = wd_context->get_child_node( name = wd_this->wdctx_cn_drpindex ).
    select carrid from sflight into CORRESPONDING FIELDS OF TABLE it_table.
    lo_nd_cn_drpindex->bind_table( it_table ).
    If you are using drop down by key ui element then you can use the following code
    DATA : node_info TYPE REF TO if_wd_context_node_info.
      DATA : it_zinsp TYPE TABLE OF zinsp.
      FIELD-SYMBOLS : <tablezinsp> TYPE zinsp.
      DATA : value TYPE wdy_key_value,
             value_set TYPE wdy_key_value_table.
      DATA : zlandx TYPE string.
      node_info = wd_context->get_node_info( ).
      node_info = node_info->get_child_node( 'CN_VISATYPE' ).
      CALL METHOD cl_wd_dynamic_tool=>get_table_data
        EXPORTING
          tab_name  = 'ZINSP' " Here ZINSP is name of table
          row_count = 0
        IMPORTING
          data      = it_zinsp.
      LOOP AT it_zinsp ASSIGNING <tablezinsp> .
        value-key = <tablezinsp>-zvisaty." This is field of table
        value-value = <tablezinsp>-zvisaty.
        INSERT value INTO TABLE value_set.
      ENDLOOP.
      node_info->set_attribute_value_set( name = 'CA_VISATYPE' " Name of attribute
                                          value_set = value_set ).
    I hope it helps.
    Regards,
    Rohit

  • Update Drop Down based on selection in Option group

    Good afternoon all-
    I've got an option box ('PanelStatus') with two options: "Panel" (value of 1) and "Non-Panel" (value of 2).
    On the form where this is located, I have a drop down box filled with names.  These people on this table are either Panel or Non-Panel.  So, my idea is that the drop down with names will be refreshed when the radio buttons in PanelStatus are clicked.
    I've got a query that will return the right results, based on what's selected in the Option Group.  However, when I set the Option Group after update event to refresh the dropdown box, Access is telling me "Object doesn't support this property
    or method".
    Any ideas/help are welcome!
    EDIT: I'm thinking it may be because the drop down is unbound...?  Does that explain why this is not working?  If so, any ideas how to do this with the drop down remaining unbound?

    The After Update event of an option group works whether the option group is bound or unbound.
    You should use the Requery method of the combo box.
    Regards, Hans Vogelaar (http://www.eileenslounge.com)

Maybe you are looking for

  • How do I go about cancelling my BT contract due to...

    I joined BT in December 2012 when I moved home. I have had to move again and gave a weeks notice that I would like my service transferred to my new address, was told that my services will stop the night before my move and that my phone service at the

  • Struts Application java.lang.ClassCastException

    We have deployed struts1.2.1 application on Oracle Application server 10g We are getting inconsistent error java.lang.ClassCastException pointing to struts html:form tag once the server restarts the exception is removed this is happening at runtime.

  • Firmware 3.0 Battery Percentage in Status Bar

    Hi, I'm currently using an iphone 3G running the 3.0 OS. I thought there was a way to display the reamaing battery in a percentage in the status bar. I don't seem to find it in settings. Anyone knows how to bring it up? Thanks

  • Movement type for stock transfer from investment order to the regular stock

    Hi, Is there any movement type for the transfer from investment order to storage location stock? We have wrong created purchase orders, where the GR transferred the items to the investment orders. The problem is, that there already a lot of invoices

  • I need to report License Abuse to Cisco

    There's a malicious website that is putting out tools that can crack mainly any cisco license, how do we go forward in reporting this site for violating Licnese Agreement?