Validate Multiselect List Against LOV

I am trying to validate what a user has selected from a multiselect list. I want to make sure the user selections are within the values of a particular LOV. I have been trying to come up with a good way to do this, but I am stumped. Does anyone have any suggestions?

Kevin,
More details are usually a good idea. You might want to use htmldb_util.string_to_table on the submitted multiselect item in an after-submit process to loop over the selected values and check them against whatever criteria you have.
Scott

Similar Messages

  • Validate field value against LOV in JClient

    Hi,
    I have wondered is it possible when i have a LOV attached to a textfield or column from JTable to validate entered value against values in LOV. I mean when i enter wrong value in field, automatically to invoke LOV panel when the field lost focus.
    Thanks in advance!

    Hi,
    this is currently not a feature available in JClient. We are evaluating this as a new feature in a next version fo ADF JClient (which will be named ADF Swing then)
    Frank

  • Validate from list, do not open lov if value already in lov

    Hi,
    I have an item and want to validate value from Lov because do not need a code in w-v-i trigger. i set property validate from list for the item to yes but when executing the lov opened even if i entered a value which already exists in lov. i thought that validate from list to yes triggers the list only if value do not exist in the list. i do not want list to open if value already exists in the list. Can someone help me with this? Thanks for your ideas.
    Edited by: Tabit7 on 2011-04-08 23:24
    Edited by: Tabit7 on 2011-04-08 23:24

    It only opens the Lov when the value not not unique, e.g. you have two equal entries in the lov. Also be aware that the validation is done against the first visible item in the lov.

  • Validate from list pops up the LOV

    Hi, everybody.
    I have a text item attached to a LOV and the validate from list property is set to YES.
    Despite this, i just write into the text item the text '01' .
    Anytime i use go_block('my_block') the LOV pops up and asks me to choose again the value for my text item from the LOV .
    Is this because my text item is connected to the first column of the LOV and
    the first column of the LOV has more than one values of '01' in the list, more than one record that has the first column '01'.
    In case this is the reason, how can i solve this to avoid poping up of the LOV.

    Ok.But all i want to do, is not to show my LOV.
    If i set validate from list=NO, my LOV doesn't show.
    I still want to validate from list but only in the cases when i put a value that is not in the LOV.
    in this case i put a value that actually is in the LOV, so the LOV should not show.
    I don't understand why LOV shows when the value i put in the text item is equal to one of the values of the LOV, only that the LOV contains this value more than one time.

  • LOV validate from list

    Hello there,
    What factors can be performed for don't validating from list, when having a text item conected by a botton which calls the LOV?
    My problem is that I conect properly the text item to the LOV and the LOV to the Record group. At the text item's properties palette, i put YES when asking if validate from list. However, in an enter-query mode, when i insert 'AAA' into the text item, and change the focus, the LOV doesn't appear.
    Why?
    Thanks to everyone who helps me.
    Sorry for my english, i am spanish.

    Those other forms use a different form of querying. They probably never go into Enter Query mode, and instead simply query with a where clause something like:
        WHERE column_1 = :control_block.item_1 and...
    All the forms I write use that format. The user is never allowed to do an Enter Query. They simply enter the control block values (which may or may not have an LOV attached), and then press the Query button.

  • How to get the selected values from multiselected list

    Hi,
    I have a multiselect list displaying all the years from 2003 to 2008 (used dynamic LOV). The user can choose one or more years as per his needs, and then when user clicks on the link the selected values of the list are to be captured and a pop up page of a Discoveror report needs to be opened where these years get passed as a parameter. I tried several methods to capture the value, but either one or all are getting passed but not exactly what the user has chosen.
    This is how it looks:
    P2_FISCAL_YEAR is a multiselect list containing values from 2003,2004... 2008
    If user chooses 2004 and 2007
    then I want the url to capture these values and pass as parameters for my discoveror reports. as '&qp_fiscal_year=2004,2007'
    Any help is appreciated!
    Thanks in advance,
    Sapna.

    Hi,
    I have a multiselect list displaying all the years from 2003 to 2008 (used dynamic LOV). The user can choose one or more years as per his needs, and then when user clicks on the link the selected values of the list are to be captured and a pop up page of a Discoveror report needs to be opened where these years get passed as a parameter. I tried several methods to capture the value, but either one or all are getting passed but not exactly what the user has chosen.
    This is how it looks:
    P2_FISCAL_YEAR is a multiselect list containing values from 2003,2004... 2008
    If user chooses 2004 and 2007
    then I want the url to capture these values and pass as parameters for my discoveror reports. as '&qp_fiscal_year=2004,2007'
    Any help is appreciated!
    Thanks in advance,
    Sapna.

  • Validate a value against table validation value set within PL/SQL

    Hi,
    I am trying to import price list lines along with Pricing attribute values.
    I have to validate the uploaded values against the pricing attribute value set, before I import them into base tables.
    Value set defined is of type table validation.
    I wanted to know if there are any public APIs that can be used to validate the value against the Value set values within my PL/SQL procedure
    Also please point me to documentation that lists various public PL/SQL APIs
    Regards,
    Mrutyunjay

    You can find functions and procedure for Value sets in packages FND_FLEX_VAL_API or FND_FLEX_VAL_UTIL.
    Example : get_table_vset_select gives you the select statement of your value set. Executing this statement will allow you to validate your values.

  • Multiselect List selected by default

    Hi, I have a Multiselect List populated with a LOV (elements in the "name" column of "TAB1").
    I would like that if "TAB1"."check" = 1 the name into my Multiselect List was SELECTED when page is charged but I found nothing about that.
    Do you have some suggestions ???
    THANK YOU ...

    Your solution is OK if my table is static but it isn't.
    If I use static / sam:pet when I update table with a new item Multiselect is not updated.
    I need to use the result of the query:
    select name
    from TAB1
    where check = 1
    and select these item into my Multiselect List where source code is:
    select name
    from TAB1
    Something like:
    DECLARE my_table wwv_flow_global.vc_arr2;
    begin
    SELECT name INTO my_table
    FROM TAB1
    WHERE check = 1;
    FOR i in 1..my_table.count
    LOOP
    P1_SELECT.value (my_table(i)) = CHECKED;
    END LOOP;
    end;
    I konw this code is not right but just to give you an idea of the way it has to work.
    THANKS

  • Validate from list problem

    I have a form in which i have a non-database item.I attached a LOV to it and have set the validate from list to yes..
    but in enter-query mode the list is not getting shown when the value is typed(ie the lov is not shown when the user enters wrong value.validation is not hapenning)
    i have even written key-listval.inside which i have given list_values still the LOV is not shown
    Any suggestions to get the LOV???

    Hi,
    You can try to use the when validate-item trigger, which executes when the cursor navigates out of an item, this happens when user press the tab key to navigate to the next item or when clicking in a different item.
    Validate from LOV works without any additional code when the form is in normal mode.
    When the form is in enter-query mode this won't work, try the key-next-item trigger instead.
    check out the forms online help section:
    "About defining triggers to fire in Enter Query mode" for more info.
    Regards,
    Hugo

  • Validate from list behavior ? help needed

    Hi,
    I have an item whith a lov attached to and the proerty of the lov is validate from list = yes.
    But when a create a record and type the begining of the words eg Jean then when i do key-list-val or F9 the lov returns me all the rows and.
    And when i press enter in the field then the lov shows with Jean% and show me only the names beginning with Jean.
    Why does it only happen when i press enter and not when doing F9?
    Should it not be the same behavior ?
    Thanks in advance.
    PS: it is quite urgent !
    Jean-Yves

    Hi ,
    When you enters a wrong value into a "Validate from List" Item and hit <ENTER> then validation to make sure that the entered value exists within the List and if it is not there , then the forms engine filters the Shows values as the value entered into the Item as helping you to select from the List cause you have entered ambigious Choise and in case no matched entries it display all the list , but in case you display the LOV normally this means you are trying to select a value then no Pre Serach happened unless you specify (Filter Before Display = true) on the LOV properties ,
    Best Regards,

  • Validate from list

    Hello everybody !!
    I've a Lov attached to text-item with validate from list property "yes". I fill the text-item who has the lov attached and lov works very well , but when I create another record the trigger "when-validate-record" fires and the lov validate once again for the same record. How can I avoid this ?
    Hugs
    Rômulo

    You probably set the name of the country in the POST-QUERY trigger. If so, set the status of the trigger record to QUERY_STATUS after doing this.
    Regards,
    Torsten

  • Forms 6i: Dynamically set Validate from List property

    Hi,
    Is there any API to set the VALIDATE FROM LIST property for an item with an LOV in Forms 6i?
    Thanks

    you can use set_item_property to do that dynamically. Look in the help for the values of the built-in

  • Validate from List Property

    i created a form and used validate from list property to TRUE for a particluar item which have LOV.But when table hav too many rows (here i hav 18000 rows) getting too slow....Is this problem is common...? If any one hve any idea about this Please help me...
    Edited by: pms on Sep 11, 2011 10:31 PM

    But when table hav too many rows (here i hav 18000 rows) getting too slow....Is this problem is common...? Yes, this is common when you have a lot of rows returned by your LOV query. In situations like this, it is best to try and reduce the size of the data returned by your LOV. One way of doing this is to enable the Filter Before Display property on the LOV. When enabled, it causes Forms to display a query criteria dialog before displaying the LOV. This too can cause slowness because this option could cause a full table scan to occur. Perhaps a better option would be to make your LOV dependent on other limiting values. For example, if your Form showed a list of all employees in a company you could make your user select limiting data like a department number to help reduce the number of employee records returned by your LOV.
    Craig...

  • Create multiple Insert statements from multiselect list

    I want to thank everyone in advance for the help on this one.
    I have a multiselect list that I would like to use to create multiple Insert statements. I would like to then take those statements and execute them against the database, thus inserting the records. My thoughts are below;
    1.     Customer selects multiple items in the list
    2.     Clicks the submit button
    3.     onclick event walks through the string created by the multiselect list and creates the Insert statements by walking through an array of the values.
    4.     the Insert statements get executed against the database
    5.     page redirects to the proper page after the process is done.
    I actually have already created a javascript function that will use the split command on the string to create an array. I then get the length of the array and walk through a loop creating the sql statements. I am not sure what to do from here. How can I get the sql to execute.
    I am not wed to this approach. If there is a better idea out there please do not hesitate to share it with me. I am relatively new to APEX and have not done much work in pl/sql or javascript. But I learn fast, so don’t hold back.
    Thanks again and please let me know what questions you have for me.
    Derek.

    I setup the demo app on apex.oracle.com:
    http://apex.oracle.com/pls/apex/f?p=26255:3
    Login as demo / demo
    Go to the "products" tab. There is a Test region with a multiselect list. It shows product names (with product id's) from the demo_product_info table.
    When you select multiple things from the list and click apply, it uses the following procedure to simply insert a new record for each into the product table. It increments the product_id by 1000 and prepends "DUPLICATE " to the product_name:
    declare
    cursor c_products is
    select product_name, product_id
    from demo_product_info
    where instr(':' || :P3_X || ':', ':' || product_id || ':') >= 1
    order by 1
    begin
    for r_product in c_products loop
    insert into demo_product_info (product_id, product_name)
    values (r_product.product_id + 1000, 'DUPLICATE ' || r_product.product_name);
    end loop;
    end;
    You can see that is working by using it on the duplicate entries themselves.
    -Richard

  • How to unselect an item in a multiselect list?

    Hi all,
    I am displaying a static lov as a multiselect list. And when I select the item in the list, the item is highlighted and I am displaying a region. Now I need to unselect that item and hide the corresponding region. No database transaction is involved. Can anyone please give me some hints?
    Rgds,
    Suma.

    When you use a select list that allows for multiple selections, the "value" attribute is only the first one selected.
    For example, if you had 3 options on the list with their "value" attributes set as "A", "B" and "C" and selected A and C, alert(document.getElementById("xxx").value) would display "A" not "A;C".
    What you need to do is to loop through each of the options and see if its "selected" value is "true". Something like:
    function testForSelected()
    var i;
    var x = document.getElementById("X");
    var o;
    for (i = 0; i < x.options.length; i++)
    o = x.options;
    if (o.value == "A" && o.selected == true)
    alert("A is selected");
    Where "X" is the multiselect list and "A" is the value of the option item you want to test for. Replace alert(...) with your show/hide function call.
    Regards
    Andy

Maybe you are looking for