Populate SELECT LIST on selecting value in another SELECT LIST

Hello
I have two SELECT LIST's
1. SELECT LIST with departments : Created a LOV which has all the departments.
2. SELECT LIST with employees : This has to be dynamic.
Based on the value from the first Department SELECT LIST I need to populate the Employee SELECT LIST.
Please let me know, how can I do this.
Appreciate your help
thanks

Hi,
Say you have two form items P1_ITEM1, P2_ITEM2. You want the P2_ITEM2 will be updated according to the selection in P1_ITEM1. I am assuming P1_ITEM1 select list based on the department table. In the lov section for that item type dynamic query -
select dept_id, dname from departments -- change attributes in query as per your table.
set the null value -1 and default value -1 for P1_ITEM1. Change Display null to YES and type -Select dept in the null text.
For P1_ITEM2 in the lov section type the following query for dynamic list -
select emp_id, ename from employees where dept_id = NV(P1_ITEM1) or NV(P1_ITEM1) = -1 -- change attributes in query as per your table.
for the second query assuming that you have dept_id as FK in the employees table. Make sure both fields are selected as select list as display. Now if user select the department from item1 it will update the item2. It will display all the employees if nothing is selected in the item1.
Hope this helps,
Thanks,
M Tajuddin
http://tajuddin.whitepagesbd.com

Similar Messages

  • Filtering a sharepoint 2010 list using Multiple values from Multi-Select Filtering In Infopath 2010 form

    I am creating a browser based InfoPath 2010 form Calendar Filtering
    using SharePoint 2010 Calendar List (All Events) and InfoPath 2010.  This form has data connection to the Calendar list. Goal is to
    compare Calendar Events from Current Year to Previous Year. I have 2 columns called - Previous Year and Current Year. I have 2 drop-down controls in each columns called
    Select Year  and Select Week. I also have common drop down called
    Select Category which holds category of the events such as weather, power outages and so on. I wish to display specific events on specific date and specific week on both columns.
    I am able to filter the list based upon Year and Week
    on both these columns by applying rules in the InfoPath 2010 form. The real issue is that I want to apply category filter on the search result of
    Year and Week. Or it needs to show all the values if I
    select Category value as All. So I wish to apply filter on Search results using Category drop-down list selection.
    Hope I could explain this better but I tried to do the best here. Any suggestions, hint, or pointers
    Thanks
    Snehal H Rana
    Thanks Snehal H.Rana SharePoint Consultant

    I am creating a browser based InfoPath 2010 form Calendar Filtering
    using SharePoint 2010 Calendar List (All Events) and InfoPath 2010.  This form has data connection to the Calendar list. Goal is to
    compare Calendar Events from Current Year to Previous Year. I have 2 columns called - Previous Year and Current Year. I have 2 drop-down controls in each columns called
    Select Year  and Select Week. I also have common drop down called
    Select Category which holds category of the events such as weather, power outages and so on. I wish to display specific events on specific date and specific week on both columns.
    I am able to filter the list based upon Year and Week
    on both these columns by applying rules in the InfoPath 2010 form. The real issue is that I want to apply category filter on the search result of
    Year and Week. Or it needs to show all the values if I
    select Category value as All. So I wish to apply filter on Search results using Category drop-down list selection.
    Hope I could explain this better but I tried to do the best here. Any suggestions, hint, or pointers
    Thanks
    Snehal H Rana
    Thanks Snehal H.Rana SharePoint Consultant

  • How to Select More then 1000 values in Multi-Select prompt!!!

    Hello Users,
    I have Scenario where i have to pass all the values from prompt to report and the values in the prompt are coming from session variable, so whatever value access user has the report will run with that only...
    Now the question is that Multi-Select Prompt is not able to take more then certain values, so is there any way that we can increase the limit for selected values??
    in-short how to increase the limit for selected values in multi-select prompt??
    Thanks In Advance!!!

    Hey David,
    The Scenario is like, we have data level security on "Unit" attribute. now based on the user selection when user logs in he should able to see the report only for those units which he/she has access.
    in total we have 1800 units available, now for 5-10 units access is fine, but the question will arise when user will not have only some units access from 1800 units.
    because report will not take those values from the multi-select prompt reason is that multi-select prompt is not able to take more then certain values in selected side.
    now in multi-select until-unless u have data coming in selected side those values will not pass. so i have kept the sql in default for that prompt.
    so when user logs in he will able to see those values in selected side for the multi-select prompt, but when values increase from some level it's going automatically in un-selected side.
    i want everything on selected side of multi-select prompt.
    Let me know if you need any further details.

  • Selection-screen - add default value to multiple selection

    Hi,
    How I can add a default value for multiple selection, on a Select-options?
    Thanks in advance,
    Brian Gonsales

    By default, selection optoins are RANGES, therefore to fill these before display, in the INITIALIZATION section
      CLEAR: so_field, so_field[].
      so_field = 'IEQvalue'. append so_field.
      so_field = 'IEQvalue2'. append so_field.
      so_field = 'IEQvalue3'. append so_field.
    If you want ranges
      CLEAR: so_field, so_field[].
      so_field = 'IBT'. so_field-low = 'lowvalue'. so_field-high = 'highvalue' append so_field.
    *  ETC
    Edited by: Paul Chapman on May 15, 2008 9:30 AM

  • Populating a Sharepoint attendance list based on values entered in second list: Tracking attendance

    Hello,
    My organization is looking to move our attendance tracking from Excel to Sharepoint, and to automate the process while we're at it.
    In short: the company needs to track employee attendance at seventeen different training events (via the "Training Attendance" list). The facilitator of each event updates a different list ("Meeting Tracker") after each session, creating
    a new item on the list to track attendees. On this new item, the facilitator also looks up and chooses (via a People/Group column) all of the attendees (in the "Attendees" column). The title of each new item is the name of the training session, and
    this name also appears on the "Training Attendance" list.
    What I am looking to do is link this Attendees column on the Meeting Tracker to automatically populate the Training Attendance list. The idea is that when a facilitator updates the Meeting Tracker list with the names of all attendees, these attendees will
    automatically be marked as having attended that class on the Training Attendance list. While tracking in Excel I have used "VLOOKUP" and "COUNTIF" functions to achieve this same result.
    So far I have tried various methods to do this but have had no luck, mainly due to the fact that it does not appear possible to use a look up function with a People/Group column. 
    Does anyone know of any other solutions or workarounds for this problem? Any suggestions would be very appreciated.
    Thank you!

    Dear Niall
    Many thanks for all your help and support to help me with this issue.  I had a think about it over the weekend and basically the solution that seems to work is to clear the list box each box each time a drop down is entered using the PreOpen event and then when a drop down is selected with a value greater than 0 an item is added to the listbox using the addItem with the inclusion of the rawValue from the drop down list in the item addd to the list box.
    ie. if (Page1.DropDownList.rawValue != 0) {
    Page1.ListBox.addItem(Test - "+Page1.DropDownList.rawValue+"")
    Your suggestions and help got me there in the end so a big thanks and I think this way will improve the performance of the form compared to what I thought I might have to do.
    Many thanks
    Darren

  • Tranferring on "select list" value to another "select list" value

    We have a drill through feature in our application where the user clicks on a value on page 1 and is taken to page 2. (e.g. the user drills on EUROPE in the REGION column on page 1 and is taken to page 2 where they see a report by countries in EUROPE.)
    We also have identical SELECT LISTS on page 1 and on page 2 for REGION (EUROPE, NORTH AMERICA, ASIA). How do we program our application so that when the user clicks on EUROPE on page 1 and is taken to page 2 the value of EUROPE from the REGION SELECT LIST on page 1 is chosen in the REGION SELECT LIST on page 2?
    We tried embedding this in the url for the drill through but the REGION SELECT LIST value on page 2 didn't change.
    In the below link shouldn't the value of the REGION SELECT LIST named P2_REGION be assigned the current value of the REGION SELECT LIST called P1_REGION? (in this case 'EUROPE')
    Thanks for help on this. John Wisnieff
    f?p=&APP_ID.:102:#APP_SESSION#::::P102_PRG1_LINK:#P1CAMP_NAME#,P2_REGION:&P1_REGION

    It would be great to get quick reply on this as we have a project due soon. I just need an answer to the below question:
    In the below link shouldn't the value of the REGION SELECT LIST named P2_REGION be assigned the current value of the REGION SELECT LIST called P1_REGION? (in this case the value is 'EUROPE')
    f?p=&APP_ID.:102:#APP_SESSION#::::P102_PRG1_LINK:#P1CAMP_NAME#,P2_REGION:&P1_REGION

  • Select LOV based on value in another table

    Hi all,
    I have an issue,
    I have an item with Select list with dynamic query in the dropdown ListofValues.
    but i want to use a condition like
    select val1 display_value val2 return_value
    from table2
    where value_in_table1 = username AND table_id1=table_id2
    in these two tables i have the id's common and table 1 is having the usernames.
    Can somebody help me in solving this issue please.
    Thanks in advance

    As far as I know, you can't dump PL/SQL into the list of values definition. Try just having select distinct PJT_NAME display_value, PROJECT_ID return_value from EZS_PROJECTS WHERE EMP_ID = :P1_XYZ ORDER BY 1

  • Select list that is dependent on another select list with ajax

    I have a select list that contains it (ajax)
    onchange = "get_select_list_ajax (this, 'P2012_REQUERENTE', 'COMBO_REQUERENTE_ITEM', 'COMBO_REQUERENTE_AJAX');" class = "largura200"
    So I have a select list below, which is conditional, according to the value returned from the select list P2012_Cliente.
    DECLARE
    v_tipo VARCHAR2 (50);
    BEGIN
    SELECT DISTINCT (id_cliente_tipo) INTO v_tipo FROM vw_cliente
    WHERE customer_id =: P2012_CLIENTE;
    IF (v_tipo = pkg_cfg.c_tp_cliente_interno) THEN
    RETURN true;
    ELSE
    RETURN false;
    END IF;
    EXCEPTION WHEN OTHERS THEN
    NULL;
    END;
    But is not working .. Why? He is not detecting the return of the select list that is Ajax?

    How can I send the return of a select list (ajax) on a text item?
    html_form_attributes of sel. list -> onchange = "get_select_list_ajax (this, 'P2012_REQUERENTE', 'COMBO_REQUERENTE_ITEM', 'COMBO_REQUERENTE_AJAX');" class = "largura200"

  • Averaging selected range based on value of another channel

    I have one channel, X, with a bunch of integer values from 0 to 90. I also have another channel with various corresponding data, lets call it Y. I would like to find the average and standard deviation for all of the values in Y that have a 0 in its corresponding X row, then the same for all values in Y that have a 1 in its corresponding row and etc, all the way up to 90. Is there an easy way to do this? Perhaps there is a way to sort the data and put all the Y values into new channels that are grouped according to their X values?

    Hi Martin,
    You have a couple of options.  You could indeed use the FormulaCalc() command to split out various rows from your data channel that all have the same index into a new data channel and do this for each index.  Alternatively, you could determine which rows contain a certain index, then use the StatBlockCalc() function to determine statistics from only these rows of your data channel:
    Dim Channel, Msg
    Channel = "[1]/Time"
    For i = 1 To 22
      StatSel(i) = "No"
    Next
    StatSel(4)  = "Yes" ' Minimum
    StatSel(5)  = "Yes" ' Maximum
    StatSel(6)  = "Yes" ' Arith. mean
    StatSel(14) = "Yes" ' Standard Deviation
    Call StatBlockCalc("Channel", "1-13", Channel)
    Msg = Msg & "Min = " & StatMin        & vbCRLF
    Msg = Msg & "Ave = " & StatArithMean  & vbCRLF
    Msg = Msg & "Max = " & StatMax        & vbCRLF
    Msg = Msg & "Dev = " & StatDeviation
    MsgBox Msg
    Note that if you have DIAdem 10.1 you should loop up to 23,
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • SELECT LIST - with values after have values in other Select List

    My friends.
    I need a select list that is self - complemented, after being selected a value in another select list above.
    Can you help?
    pesquisar

    Good afternoon,
    Try this for the definition of your select list:
    select emp.emp_name as display_column,
           emp.emp_id as return_column
      from employees emp
    where emp.department = :P1_DEPT_NO
    order by emp.emp_name;This will look at the select_list called :P1_DEPT_NO, capture the value that is currently selected and then populate the EMPLOYEE select list based on the results. Just use a query like this as the one that defines your second select list.
    This seems to be a popular question. Search this forum for other information.
    Don.
    REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone! :)

  • How to assign list of default value for select-option variable???

    Hi every one
    This is Deepak,
    I want to know how to assign list of default value to select-option variable ? please any body tel me solution
    for example
    select-option matnr for mara-matnr default ..............and here i want to give more than 1 values that will be default value and use can choose any one at the time of input .
    Thank you in advance
    Deepak

    Hi.
    Check the following sample code.
    REPORT ztn_test.
    " It is example for list populating.
    TABLES:knvp.
    data: BEGIN OF itab OCCURS 10,
          kunnr like knvp-kunnr,
          END OF itab.
    data: wa_itab like itab.
    TYPE-POOLS: vrm.
    DATA: name TYPE vrm_id,
    list TYPE vrm_values,
    value LIKE LINE OF list.
    PARAMETERS: s_kunnr(20) type c  as LISTBOX VISIBLE LENGTH 40 .
    AT SELECTION-SCREEN OUTPUT.
    SELECT kunnr from knvp  into  CORRESPONDING FIELDS OF TABLE itab WHERE parvw = 'SP'. " SP for ur requirement
    " I have used loop to populate some values from table
    loop at itab into wa_itab.
      name = 'S_KUNNR'.
      value-key = sy-tabix.
      value-text = wa_itab-kunnr.
      append value to list.
      clear wa_itab.
    endloop.
    " If u want individaully assign the values change the code as
    name = 'S_KUNNR'." Select option name
      value-key = 1." Index
      value-text = 'VAL1'.
      append value to list.
    name = 'S_KUNNR'." Select option name
      value-key = 2." Index
      value-text = 'VAL2'.
      append value to list.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING id = name
    values = list.
    Edited by: tahir naqqash on Feb 21, 2009 4:38 PM

  • Is it possible to select multiple values from an enumerated list?

    I have a Category with an Attribute defined as an enumerated list. Is it possible to select more than one value from the enumerated list? If not, does anyone have a recommended approach for configuring Categories or Attributes that often have more than one of the Attribute values selected? Do I just use multiple Categories and/or Attributes with the same enumerated list? If so, is there an efficient way (API, maybe) to copy the enumerated list values from one Attribute to a new one (or one Category to another)?
    Thanks for any ideas!
    ~Mark

    Boy, this is something we're struggling with too. So we'd like to hear others' ideas on this also.
    thank you,
    iggy

  • Dynamically change the value of a select list in form based on a table

    Hi Friends,
    I am using a form based on a table. I want to display two fields as select lists instead of text boxes and when a value
    in a select list is selected, the corresponding values will be listed in the next select list. For example if department
    value is selected in a select list the employees in that department will be listed in the employee select list. I saw a
    metthod using ajax for achieving this in tabular form in Denes's sample application[Click Here| http://apex.oracle.com/pls/otn/f?p=31517:176:462842537250908::NO] .
    Is there any way to achieve the same for a form based on a table,
    Thanks,
    Tj

    Hi Andy,
    Could you tell me how I could use your example with multiple Application Items?
    My page has 3 cascading select lists. The second is dependent on the first and the third is dependent on both the first and second. I thought I would just need to add the second application item as a get, but not sure what the syntax would be. I have troubleshooted to the point where my select list refreshes when I have one in the javascript...just not sure how to add the additional one?
    Here's what I have (I have been referencing your 'Get Employees' page)
    My Page Items:
    P0_VENDOR_ID
    P0_VENDOR_SITE_ID
    P0_INVENTORY_ITEM_ID
    My Application Items:
    F_VDR_ID
    F_VDR_SITE_ID
    My query in the application process has both F_VDR_SITE_ID and F_VDR_ID in it.
    My javascript function...this worked OK until I added the additional get.add('F_VDR_SITE_ID')
    function getItems(filter, listName)
    var xml = null;
    var list = document.getElementById(listName);
    var listvalue = list.value;
    var get = new htmldb_Get(null,$v('pFlowId'), 'APPLICATION_PROCESS=Set_Items',4);
    get.add('F_VDR_ID', filter.value);
    get.add('F_VDR_SITE_ID', filter.value);
    ret = get.get('XML');
    if(ret)
    var s = ret.getElementsByTagName("select");
    if(s){
    var o = ret.getElementsByTagName("option");
    var oCount = o.length;
    list.options.length = 0;
    for(var i = 0; i < oCount; i++){
    var l_Opt_Xml = o;
    appendToSelect(list, l_Opt_Xml.getAttribute('value'), l_Opt_Xml.firstChild.nodeValue);
    list.value = listvalue;
    if (list.selectedIndex == -1)
    list.selectedIndex = 0;
    get = null;
    Thanks,
    Janel

  • Select Lists - Setting and Referencing (Using) the Select List variable

    I have (a login page and) 3 application pages (call them Day, Week, Month), each with similar selection lists and a chart. I have three requirements.
    1) When a new selection is made, the value of the selection list variable is updated --that is, it does what select lists do.
    2) I need to set the value of the Month selection list variable before the Month page is rendered for the first time -- I need to give it an initial value.
    3) When navigating from page to page, say from Month to Week or Day back to Month, I need to have the value of the selection list variable carried to the new page from the value on the previous page.
    It sounds simple to me -- something that one could do with an (global) application item. The logic would be like
    IF :Page_Name_Flag = 'Week' THEN -- staying on the Week page
      SELECT :WK_SelectList_Name INTO :GLOBAL_SelectList_Name FROM DUAL
    ELSE -- new pass on this page
      SELECT  :GLOBAL_SelectList_Name INTO :WK_SelectList_Name FROM DUAL
      SELECT 'Week' INTO :Page_Name_Flag
    END IF;But that doesn't work for me. The page's select list variable seems to be NULL sometimes causing the value of :GLOBAL_SelectList_Name to be set to null. Other times, the copy from the global variable to page select list varable doesn't seem to change the page select list variable.
    At http://apex.oracle.com/pls/apex/f?p=43250:101 (guest/Ima9Gue8t) is an example where I have each page's select list working (except on the initial visit to the page, where the select variable is null!!!). How can I get the select list value on the new page to sync with the value from the previous page?
    Thanks,
    Howard
    Edited by: Howard (DBA in Training) on Sep 18, 2012 11:53 AM

    I'm closing this because I got it to work. In the end, it worked as I had described above. There was some setting of the Select List variable, that I now have correct, that was incorrect before. I wonder what it was?

  • How do I populate one dropdown list based on the selection in another dropdown list?

    I have one dropdown list that has 21 choices.  Depending on the selection of those 21 choices, I have another dropdown list that will select a different subset of choices from a pool of 96 choices.  How do I get this to happen?

    I have one dropdown list that has 21 choices.  Depending on the selection of those 21 choices, I have another dropdown list that will select a different subset of choices from a pool of 96 choices.  How do I get this to happen?

Maybe you are looking for