Using value of selected item list

I'm working on existing code. I want to use the value of a selected item in a list to use it in a query. So, the corresponding records should be displayed in a subform when an item of the list is selected. This is the code i'm using:
This is the code i use to populate the list
DECLARE
locatienaam varchar(100);
locid number;
recordcount number;
i number;
correct NUMBER;
hList ITEM := Find_Item('LIST_LOCATIE');
iRC PLS_INTEGER := 0;
currValue VARCHAR2(60); /* increase if required*/
BEGIN
--vraag het bijhorende ID op van de geselecteerde locatie.
currValue := Name_In('LIST_LOCATIE');
FOR i IN 1..Get_List_Element_Count(hList) LOOP
IF currValue = Get_List_Element_Value(hList,i) THEN
iRC := i;
break;
END IF;
END LOOP;
locid := GET_LIST_ELEMENT_VALUE('LIST_LOCATIE', iRC);
locatienaam := GET_LIST_ELEMENT_LABEL('LIST_LOCATIE', iRC);
Below the code i use to make the query
SET_BLOCK_PROPERTY('V_KALENDER',DEFAULT_WHERE,'(BEGINDATUM BETWEEN '||''''||:V_KALENDER.TIJDSTIP1 ||'''AND '||''''||:V_KALENDER.TIJDSTIP2||''') AND (NAAM=:locatienaam)');
GO_BLOCK('V_KALENDER');
Execute_Query;
I get the message: "unable to resolve reference to locatienaam"
The subform is populated with all the records between the two dates of all the locations, not only by the selected location.

Hi,
Welcome to the forum!
If locatienaam is a local variable, don't use a colon (:) to reference it.
You didn't say
IF :currValue = Get_List_Element_Value(:hList,:i) THEN so why should you say
:locatienaam?

Similar Messages

  • Error Occur when trying to select Item List

    Hi Experts,
    Machine gets Hang when trying to select Item List  in  row level PO,SO ect as well as in item master Data when Pressing Star ( * ) .
    and when trying to close this window then error occur as close the program and problem occur on server itself
    Test Database is working fine.
    worked around
    1.Restarted  the machine
    2.Restarted services
    using SBO 9.0 PL 7
    OS-Window 7 Professional
    Please Find the Two Error Attachments
    Please help me
    Thanks & Regards
    Navnath

    Hi
    Check the below thread
    SAPB1 Application Hang and Not responding when i serch item in any document
    With Regards
    Balaji Sampath

  • Select item list

    is their a way to do a add from a select item list.
    IE: created a view of the items i wanted to select off. based on this view i want to select it from the select item list and then add these records to another table.
    table 1: item id, item description, item points used (i wrote a view for this)
    table 2: redeem item id, redeem points used
    Thanks.

    Hi
    Check the below thread
    SAPB1 Application Hang and Not responding when i serch item in any document
    With Regards
    Balaji Sampath

  • Using checkboxes to select items in a Spark DataGroup/List?

    I have a DataGroup from Catalyst, laid out like a tile list:
    I'd like to do something a bit different, in that I'd like to allow people to multi-select items in the list using those checkboxes instead of the usual command/control-click.
    The checkbox, label and image are in the itemRenderer.  Is there an easy way that I can have that checkbox toggle the selected state of its list item?

    Hi,
    Using the checkbox as a selection is easy enough as all you have to do is add a change event to the checkbox in the renderer and then in the event
    selected=mycheckbox.selected;
    The fun is how to handle the list click event from the checkbox you can stop propagation but if the item is clicked it will reset the selected indices.
    There is a few ways to handle this
    when processing the list don't use the selected indices just use the checkbox value to determine whats selected
    disable the listbox click event so items have to be selected with the checkbox
    or the most complex lots of overriding so that click acts like a ctrl/click and the checkbox/itemclick can toggle each other.
    David

  • Resolved: Use value from select list in pl/sql block

    Hello,
    I have a form with a select list: P18_BONUSTYPE, the values of which come from a LOV.
    When the user clicks a button, a page process is used to insert a row into a table.
    When I use the :P18_BONUSTYPE bind variable in my insert statement I get an error "Invalid number" I get an "Invalid number" error. I assume that APEX is using the displayed text in that bind variable, not its actual (html option) value.
    I checked the HTML of the page, and the correct values are in the select list.
    Can someone tell me how to get the value into a bind variable that can be used in a pl/sql block for a page process?
    Thanks
    Message was edited by:
    Neeko
    Issue was a value in another item.

    Did you tried changing the value using "to_number"? (i.e. to_number(:P18_BONUSTYPE)).
    Max.

  • Retrieving value of selected item in sap.m.list

    var data = {
                    details :   [{             
                 Name : "MuthuKannan",  Age : "22",Location :"Bangalore" },
              {  Name : "Sachin Tendulkar",  Age : "35", Location :"Mumbai"  },
    var model = new sap.ui.model.json.JSONModel();
    model.setData(data);
    var model1 = new sap.ui.model.json.JSONModel(); 
    model1.setData({ 
             col1 : "Name ", 
             col2 : "Age", 
             col3  : "Location "
    sap.ui.getCore().setModel(model1, "mkModel1");
    list = new sap.m.List("", { 
                  threshold: 2,
                  inset : false, 
                  select :  function(){
             a = list.getSelectedItems();
                 alert(a[0].getBindingContext());
    How can I get the name of selected item? I tried the highlighted text but I am unable to proceed ,I even tried toString() function still I am not getting the output.All I am getting(alert box)  is either "null" or "undefined". Kindly help me on this.
    Thanks and Regards,
    Muthu Kannan S

    Try this
    list = new sap.m.List("", {
                  threshold: 2,
                  inset : false,
                  select :  function(oEvent){
                     // oEvent is the key to access everything
                     oEvent.getSource().getSelectedItem() ;

  • FMS using values in row items of form

    Hi Experts,
    I have a situation where i provide a list of values to the user using a format search to get the required serial number. the format search appears in the following manner
    Find |_<text to be found>___|
    <Search Results from the query>
    *Manufac, Serial
    Serial Number
    Batch ID*
    AAAA1
    BBBB1
    CCC/1
    Now in my form i need to enter all three data items listed in my format search but when i select the entire row from my FMS I only get the value to the row item that i defined the FMS. Can any one let me know if there is a way to get the relevant values filled to the relevant columns. i don't want to define the same FMS to three columns.
    One way that i found is to use the following command in the manufacturer Serial and Batch ID columns and set the format search to refresh every time the serial number changes  --- but it didn't work -
    or i did it wrong --- please help
    SELECT T0.[SuppSerial] AS 'Manufacturer Serial No.' FROM  [dbo].[OSRI] T0 WHERE T0.IntrSerial = '$http://$21.54.1'
    21 = formID, 54 = Column , 1 = row.

    The basic steps would be something like this:
    1. Put the FMS that gets the Manufacturer Serial No. into the first column. Its variable comes from $[21.54.1] or a user choice or something?
    2. Put the FMS that gets the Serial Number into the second column. Its variable is the value in the first column, and it refreshes when that value changes.
    2. Put the FMS that gets the Batch Number into the third column. Its variable is the value in the second column, and it refreshes when that value changes.
    After that I would need to see the FMS's that you tried.

  • Previous Values of Selected Items in a Datagrid

    I have a datagrid which the dataprovider is bound to an ArrayCollection of Value Objects from a web service.
    One other thing which is important to point out.   The Value Objects are created automatically for the Data/Service and so if I change the files, they will just be overwritten the next time I make a change to the service.
    The grid displays Inventory Items.    Lets say that Item 1 has a qty of 20.   Item 5 has a Qty of 10.
    The list in this grid is based upon the selection of a Location tree.   So it lists the inventory items for a certain location.
    I also have a second tree and grid for the to location inventory items.
    Between the two grids, there is a button which when clicked it iterates thru the selected items and creates a new item in the to list with qty 1 and saves it.  then decreases the current qty in the from list by one.
    So lets say I selected items 1 and 5 and then clicked the button.   A new copy of Items 1 and 5 are created in the to list with a qty of 1 and then saved.   Then the qty in the from list is decreased by 1 and saved and so the vales for 1 is now 19 and for 5 is 9.
    I would like to be able to change the qty in the from list to the qty I want to move.   So when the button is clicked the new item in the to list reflects the new qty and is saved.   Then the previous value of the current qty is decreased by the qty which is displayed in the grid
    So lets say I changed item 1 to 2 and Item 5 to 3 and then selected items 1 and 5 and then clicked the button.   A new copy of Items 1 and 5 are created in the to list with a qty of 2 for item 1 and 3 for item 5 and then saved.   Then the qty in the from list is decreased for Item 1 by 2 and item 5 by 3 and so now Item 1s qty is now 18 and items 5 qty is now 7.
    My first thought was if I had the previous values stored then no big deal.  But I put a break point at the point where the SelectedItems list is being iterated through and the previous values are not stored anywhere. 
    Any suggestions for this?

    ...in the mean time, this should be enough
    win.pnl.list1.onChange = function() {
         alert(this.selection.index); // for this to work set, multiselect:false
    I guess you already tried and the result is "undefined", the reason is you have this property
    multiselect:true
    in that case, selection returns an array,
    this.selection[0].index;
    would give you the first selected item, even if you only have one item selected, to get all selected items loop thru all items in the selection array.
    not sure if Peter's wonderful guide explains this (it is explained in the Tools Guide), but you should read it too, it has tons of great info.

  • Check Value of Selected Item

    I select an item from table, what syntax do i have to use to know if the last digit of the value i selected is equal to 6 to 9?and how can i append value from that selected item

    Hi,
    u can use like this....
    SELECT *
                 FROM <dbtab>
                 INTO TABLE itab
                 WHERE <fldname> LIKE '%6'
                 OR <fldname> LIKE '%7'
                 OR <fldname> LIKE '%8'
                 OR <fldname> LIKE '%9'
    and for the Appending part..
    SELECT *
                 FROM <dbtab>
                 APPENDING TABLE itab
                 WHERE <fldname> LIKE '%6'
                 OR <fldname> LIKE '%7'
                 OR <fldname> LIKE '%8'
                 OR <fldname> LIKE '%9'
    Edited by: Sukriti Saha on Oct 24, 2008 9:25 AM

  • How to get the display value of selected item in list box?

    I have a page with an HtmlSelectOneListbox that is filled with an ArrayList of SelectItem objects.
    The SelectItem objects contain a Key and Value. The Value is displayed in the ListBox.
    The value parameter of the listbox is bound to a bean property which is called selectedListItem.
    The bean property selectedListItem contains the Key of the SelectItem that is selected.
    How do I obtain the Value of the selectedListItem?
    I need to be able to get the Value field that is displayed, not just the Key to the item that is displayed.
    Edited by: burferd on Nov 3, 2007 10:03 PM

    How are you filling in the value of the menu? Obtain it back by the same way. Or pass it along the key in a object.
    This article may give useful insights: http://balusc.blogspot.com/2007/09/objects-in-hselectonemenu.html

  • How to acquire display value of selected item on select list? Or...

    I have a select list generated from a SQL query that I need to get the display value from.
    Ideally, the display value and the submitted value of the select list would have been the same, but I can't seem to get APEX to allow populating a select list's display value and submitted value fields with the same database column.
    If you have any idea how to do either of the above, I'd love to hear from you here!
    Cheers,
    Ben

    you forgot the extra quotes I guess:
    declare
    l_sql VARCHAR2(4000);
    begin
    l_sql := 'SELECT product_name,project_name,information_access_system,dataset_name FROM v_dms_product WHERE product_name = ''' || :P24_CHOOSEPRODUCT || ''' GROUP BY product_name,project_name,information_access_system,dataset_name';
    return l_sql;
    end;

  • Using value of application item in javascript

    Hello All,
    Apex 3.1
    I have a javascript that calls an application process, please see below. In the application process I have logic to set/change the value of an application item. Later in the javascript I need to set a page item to the value of the application item which was set in the application process. Any alerts that I post during the javascript show this value as blank, even though a similar HTP.prn in the application process displays the value!. After the script completes the correct value of the application item is in session state . Can someone explain this timing issue to me? Why can't I get the value of an application item in the javascript when the application process is called from the javascript?
    Is there a simple workaround here for me to get this value?
    <script>
    function f_ValidateLinkLine(pThis) {
       // The row in the table
       var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
       // is Link Line really a number? 
       if ( isNaN(html_GetElement('f20_'+vRow).value)) {
            if (html_GetElement('f20_'+vRow).value.length > 0) {
            alert('Link Line is an invalid number - '+html_GetElement('f20_'+vRow).value);
            html_GetElement('f20_'+vRow).value = '';
       } else { 
           if ( ! isNaN( parseFloat(html_GetElement('f20_'+vRow).value) ) ) {
       var link_line = parseInt(html_GetElement('f20_'+vRow).value);
       if (html_GetElement('f20_'+vRow).value.length > 0) {
          var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=ValidateLinkLine',0);
          get.add('F101_LINK_LINE',html_GetElement('f20_'+vRow).value);
          get.add('F101_INVENTORY_ITEM_ID',html_GetElement('inventory_item_id_'+Number(link_line)).value);
          get.add('F101_QUOTE_LINE_LINK_ID',html_GetElement('f01_'+spacer+link_line).value);
          get.add('F101_QUOTE_LINE_ID',html_GetElement('f01_'+vRow).value);
          get.add('F101_QUOTE_NUMBER',html_GetElement('f19_'+vRow).value);
          gReturn = get.get();
       // The application process can sometimes change the value of F101_QUOTE_LINE_ID
      //  and I need to set f37 to this value when this happens
        html_GetElement('f37_'+vRow).value =('&F101_QUOTE_LINE_ID.');  //< -- This does not work, the applicaiton item is blank!
          if (gReturn) {
           alert(gReturn);
          if(gReturn) {
           html_GetElement('f20_'+vRow).value = '';
           html_GetElement('f37_'+vRow).value = '';
       }  //End Check Length
      } else {
      html_GetElement('f37_'+vRow).value = '';
      } // is Link Line a number?   
    } // End If  
    } // End ValidateLinkLine
    </script>Edited by: blue72TA on Aug 16, 2011 11:39 AM
    Edited by: blue72TA on Aug 16, 2011 11:41 AM
    Edited by: blue72TA on Aug 16, 2011 11:41 AM

    Hi,
    When you use application item in JavaScript like you do, string &F101_QUOTE_LINE_ID. is substituted by item value from session state.
    Changes to that item value when you call On Demand process do not affect to page.
    Lets take example,
    You app item F101_QUOTE_LINE_ID value is e.g. XX in session state.
    You run page and see page source it looks like this
    html_GetElement('f37_'+vRow).value =('XX');Kind you have hard code value to JavaScript.
    Nothing will change that unless you refresh page.
    You need return value from On Demand process.
    To set value code could look like then
    html_GetElement('f37_'+vRow).value = gReturn;Regards,
    Jari

  • How to Captured Value into Select-Options Range Table Without "Enter"

    Hi,
    I defined a set of Select-Options in the Web Dynpro. I found that the value for the Select-Options will not be captured whenever I manually type in the value instead of choosing it from F4 Help Drop Down.
    However, this problem can be resolved if I manually type in the value for Select-Options in the Selection Field and I press "Enter". Without pressing "Enter" value will not be captured.
    Any solution for this issue? Please help.

    Hi Kris,
    My problem is only when the user key in the value themselves rather than choosing it from Select-Options drop down value. Most of the time user will know what value to key in and will skip the step to choose from the Drop Down List. Thus, if this happen, the value keyed in by the user will not be able to capture into the range table.
    I am using this logic to capture the value for selection item:
      wd_this->m_helper->get_selection_screen_items(
        IMPORTING et_selection_screen_items = lt_sel_item ).
    * Values From Selection Screen
      LOOP AT lt_sel_item ASSIGNING <fs_sel_item>.
        CASE <fs_sel_item>-m_id.
          WHEN `PERNR`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_pernr>.
          WHEN `BUKRS`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_bukrs>.
          WHEN `STAT2`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_stat2>.
          WHEN `WERKS`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_werks>.
          WHEN `BTRTL`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_btrtl>.
          WHEN `PERSG`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_persg>.
          WHEN `PERSK`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_persk>.
          WHEN `ABKRS`.
            ASSIGN <fs_sel_item>-mt_range_table->* TO <fs_abkrs>.
          WHEN `BEGDA`.
            ASSIGN <fs_sel_item>-m_value->* TO <fs_begda>.
        ENDCASE.
      ENDLOOP.
    E.g. User key in the BUKRS without using the Drop Down Value provided by the Select-Options. For this case, <fs_bukrs> table will be initial as no value is captured.
    Edited by: Girish Nabar on Apr 21, 2011 8:55 AM

  • TFS Workitems:Bugs : I want ot select different lists, from the global list, for fields basd upon user group

    Hi,
    I am customizing the bug workitem workflow.
     I want ot select different lists, from the gllobal list, for fields basd upon user group
    I am aware that I can use "when" clauses in the allowed/suggested values of the field.
    My question is : how do I get the group(s) that the current user is in and how do use this to select different lists?

    Hi!
    You can not do this through standard way. You must to create the custom work item control:
    http://witcustomcontrols.codeplex.com/
    And get the user group through IIdentityManagementService.
    IIdentityManagementService IdentityService = _workItem.Store.TeamProjectCollection.GetService<IIdentityManagementService>();
    TeamFoundationIdentity _curid = null;
    _workItem.Store.TeamProjectCollection.GetAuthenticatedIdentity(out _curid);
    string _group = "Admin";
    var _gr = IdentityService.ReadIdentity(IdentitySearchFactor.AccountName, _group, MembershipQuery.Direct, ReadIdentityOptions.None);
    if (_gr.Members.Where(s => s.Identifier == _curid.Descriptor.Identifier).Count() > 0) return true;

  • 6.1 Print Templates - auto select items in the print dialog popup

    In the slide deck I have about 6.1 it says the following:
    •Print Templates
    –Print templates can now be used to auto select items in the
    print dialog popup. By default, the out of the box template
    selects the current specification
    Unfortunately I haven't been able to find how to do this in the EP documentation. Could someone point me in the right direction on how to do this?

    Download Extensibility Pack 2.6. It was just released. Take a look at page 11 in the Print Extensibility Guide. It should have the info you need. If not let me know.
    Here is the link for the downloads:
    https://support.oracle.com/CSP/ui/flash.html#tab=PatchHomePage(page=PatchHomePage&id=h1j503ev())

Maybe you are looking for

  • Excise duty recover account- urgent issue

    < MODERATOR:  Message locked.  Please read the [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] before posting next time. > Dear All, After doing billing and it is released into accounting then in excise

  • Photos added to icloud drive from my imac do not sync to my iphone

    Hello and thank you in advance for any help you may be able to give.  The following three paragraphs are a detailed description, as is the last paragraph, which is just a summary. The rest is a rant, because I have become a very frustrated consumer w

  • (Win8.1 Pro) Blue Screen of Death: IRQL_NOT_LESS_OR_EQUAL

    I'm getting intermittent BSODs, usually with the message "IRQL_NOT_LESS_OR_EQUAL". It doesn't appear to be tied to a specific activity - sometimes it will happen when I'm not at the computer. I tried doing a Memory Diagnostic test and it found no err

  • Adobe flash player is not working safari

    adobe flash player is not working safari

  • Really odd y axis and scatter graph HEEEEELLLLPPP

    Ok so whenever I try to plot a graph of certain data, it always comes up with the same graph which is not the one I am trying to plot!!! There are also two 2s on the y axis this is reeeaaaallly anoying help would be much appretiated! I would post a s