Point Set size dynamically the value of the corresponding select list

Hi friends,

Few days, before I learned a concept of change the size of the item dynamically according to the value of the selection using Jari list. I missed to ask him something (such as an extension of it).

This is the thread

{: identifier of the thread = 2282838}

He produced the wonderful example below

http://actionet.homelinux.net/htmldb/f?p=100:214:7956651650754287:NO:_

Was that I missed in it, it possible to change the label of the element according to the selection list.

According to the example, jari has limited the size of the element according to the selection list. Suppose that in this example if I select "China", im getting elements of different size and "India" means im get point of different size. But the labels of all the four elements are the same as

attribute < li > 1
attribute < li > 2
attribute < li > 3
attribute < li > 4

As an extension, I need like assume that 'China' means that the label of the columns must be

< Li > State
< li > address
< li > pincode
< li > district

If "India" is the label of the four elements must be

< li > customers
< Li > operators
< li > units
< li > provinces

It is possible to generate different labels for the different size points, according to the value of the selection list. Since there are only four elements present in the database table.

Brgds,
Mini

Hello

Alter the table where you have point sizes and add the ITEM_LABEL column.
Fill the column with the values you need for labels.
Add the new column for the application process

DECLARE
  l_sql VARCHAR2(32700);
BEGIN

  l_sql := '
    SELECT item_name,
      item_size,
      item_label
    FROM demo_item_dyn_size
    WHERE lov_value = :P214_COUNTRY'
    ;
   APEX_UTIL.JSON_FROM_SQL(l_sql);

EXCEPTION WHEN OTHERS THEN
  HTP.PRN('{"row":[]}');
END ;

And change something like JavaScript


See working example
http://ActioNet.homelinux.NET/HTMLDB/lspdemo?p=214

Kind regards
Jari

Published by: jarola on 27 Sep 2011 19:39

Corrected JavaScript.

Tags: Database

Similar Questions

  • Facing problem in the multiple selection list...

    Hi Andy,.

    We are facing a problem more...

    In the selection of the Menu... Like u given a solution for dropdownlist hide which works very well... but the same logic does not work for the multiple selection list item. Why so...


    David...

    Published by: David on November 17, 2008 05:22

    Hello

    If you have added in the Page template, then the P39_BATES_DESCRIPTION will not work. As the P63_ATTRIBUTE_CLASS_CODE is not on the page, javascript will throw an error and that will stop the rest of the code to run.

    You can get javascript to test for the existence of a question of fact:

    if ($x('P63_ATTRIBUTE_CLASS_CODE')) {$x('P63_ATTRIBUTE_CLASS_CODE').style.display = 'none';}
    if ($x('P63_ATTRIBUTE_TYPE')) {$x('P63_ATTRIBUTE_TYPE').style.display = 'none';}
    if ($x('P39_BATES_DESCRIPTION')) {$x('P39_BATES_DESCRIPTION').style.display = 'none';}
    

    Andy

  • By the way Select list value to another page via report link

    Hello

    I have a page 1001 with an item from the selection list (SLI), a button (BTN) and a report (EPR).

    After selecting a value of the element of selection it s possible to click on the button.

    After clicking the report button will display the data. Report structure: ID, COL1, COL2, COL3, COD values in COL1 is the links to the page 1011.

    I managed to pass the value of a column in the report, but how to pass the value of SLI this link?

    I tried: SLI, SLI, #SLI # and & SLI... but nothing has worked.

    You have an idea?

    1013248 wrote:

    Please update your forum profile with a real handle instead of '1013248 '.

    I have a page 1001 with an item from the selection list (SLI), a button (BTN) and a report (EPR).

    After selecting a value of the element of selection it s possible to click on the button.

    After clicking the report button will display the data. Report structure: ID, COL1, COL2, COL3, COD values in COL1 is the links to the page 1011.

    I managed to pass the value of a column in the report, but how to pass the value of SLI this link?

    I tried: SLI, SLI, #SLI # and & SLI... but nothing has worked.

    You have an idea?

    Use the exact static text substitution method to reference the value of the element. This requires an end point ('.) ») :

    &SLI.
    
  • Delete in the database based on the values of the multiple selection list

    Hello

    I have a selectlist in Apex and a function in the database to make a deletion based on the value selected in the selection list.
    FUNCTION delete_batch (v_batch VARCHAR2) RETURN VARCHAR2
    IS
    BEGIN
    IF v_batch like 'M%'
    THEN
       RETURN ('A monthrun cannot be deleted');
    ELSE
       DELETE FROM so_disco_pa
       WHERE  batch = v_batch
       ;
       DELETE FROM so_batch_pa
       WHERE  batch = v_batch
       ;
       COMMIT;
       RETURN ('Batch '||v_batch||' has been deleted');
    END IF;
    EXCEPTION
    WHEN OTHERS THEN
        RETURN ('Batch could not be deleted');
    END delete_batch;
    The package is called when the user clicks on the button Delete with the rest of the process:
    BEGIN
    DECLARE
    x   varchar2(100);
    BEGIN
    x := pa_control.delete_batch (:P3_BATCH);
    :F105_MESSAGE := x;
    END;
    END;
    Now, I want to change the selectlist for a multiple-selection list to make several batches can be deleted.

    How can I change my procedure and the procedure to remove lots based on the values selected?

    Thank you

    Diana

    dianap says:
    I got this far, but only the first batch selected in the list is being deleted. The other values of selected package are not removed.

    Help please.

    Move the RETURN statement out of your loop.

  • Values of the cascading select list is not displayed because the ampersand &amp; in LOV

    Hello
    I use the LOV example Denes Kubicek http://htmldb.oracle.com/pls/otn/f?p=31517:119 cascading

    and I have a problem when my ename has an & in the name. In this case no values appear in the select list cascading. The application process, I use looks like this:

    < pre >
    BEGIN
    OWA_UTIL.mime_header ("text/xml", FALSE);
    HTP.p ('Cache-Control: non-cache');
    HTP.p ('Pragma: non-cache');
    OWA_UTIL.http_header_close;
    HTP.prn ("< select >");
    HTP.prn ("< option value ="' | 1 |) "" > ' | '- all employees-' | ' < / option > ");"

    FOR c IN (SELECT ename, empno
    WCP
    WHERE mgr =: cascading_selectlist_item_2)
    LOOP
    HTP.prn ("< option value ="' | c.empno |) '">' || c.Ename | ("< / option >");
    END LOOP;

    HTP.prn ("< / select >");
    END;
    < / pre >

    What should I change to make it work?
    Jacob

    Jacob,

    What happens if you change your application process on like this:

    DECLARE
       v_ename   VARCHAR2 (200);
    BEGIN
       OWA_UTIL.mime_header ('text/xml', FALSE);
       HTP.p ('Cache-Control: no-cache');
       HTP.p ('Pragma: no-cache');
       OWA_UTIL.http_header_close;
       HTP.prn ('');
    END;
    

    Do you still have the same result?

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • The value of another field using the multiple-selection list

    Hello

    I have a multi select list as USER name name...
    In these cases, I select several users as For example JOHN AND JACK
    Database that should get both their email ID then fill in textarea (separated by commas)

    As I am new to apex, pls help.

    Welcome to this forum... :))

    What is your version of the database?

    If you use database 11g then you can use the following query for your condition,

    select LISTAGG(user_email, ':') WITHIN GROUP (ORDER BY user_email) from table_name
    where INSTR(':'||NVL(:PX_USERNAME,user_name)||':',':'||user_name||':')>0
    

    instead of PX_USERNAME use the name of your multi selection list.

    Use this query in your textfield.

    Thank you
    Lacombe

  • How to reduce the size of the drop-down list

    Hello

    I had a page to developded. In this page you can have a selectOneChoice. If I click on this drop-down menu, this drop-down list exceeds the browser. SO how to avoid that the height of the drop-down list.

    Kind regards
    Rami.

    Rami,

    The af:selectOneChoice component is intended for a relatively small number of items in the drop-down list. If you want a large number of items, it is recommended to use the af:inputComboboxListOfValues instead

    The af:selectOneChoice component is intended for a relatively small number of items in the drop-down list. If you want a large number of items, it is recommended to use the af:inputComboboxListOfValues instead

    The af:selectOneChoice component is intended for a relatively small number of items in the drop-down list. If you want a large number of items, it is recommended to use the af:inputComboboxListOfValues instead

    The af:selectOneChoice component is intended for a relatively small number of items in the drop-down list. If you want a large number of items, it is recommended to use the af:inputComboboxListOfValues instead

    You must use af:inputComboboxListOfValues.

    John

  • New file depending on the size of the current selection?

    Is there a way to make a new file based on the current selection?

    Copy the selection to the Clipboard.

  • Failed to create a dynamic action ALERT to build a Select list when selecting a particular value.

    Hi everyone, this should be so easy, and yet I'm stuck.

    I have a form with a P110_VESSEL_ID element.   This article is a list of selection.   It is based on the query:

    Select distinct v.vessel_name, v.vessel_id

    of ships v, frequent_fishermen ff

    where ff.dea_permit_id =: G_PERMIT_ID and

    FF:vessel_id = v.vessel_id

    UNION

    Select v.vessel_name, v.vessel_id

    of apex_collections v, vessels

    where collection_name = "SUPVES_COLLECTION" and

    a.C002 = v.vessel_id

    If the user decides from the values in the selection list query, they can opt to SELECT all THE VALUES.  This SELECT all VALUES is a TEXT of ITEM POST on P110_VESSEL_ID.

    < a id = "popVessels" href = "#" > < font color = blue > select all < /a > ships

    It all works very well.

    The problem is that when the user selects a boat name = "UNKNOWN" and it is corresponding to the value of vessel_id, I want an ALERT to appear indicating that they should check that the boat is UNKNOWN and no one's any ship.

    I created a dynamic action

    event = change

    Select type = item

    Item = P110_VESSEL_ID

    Real ACtion #1 is the ALERT.

    Currently, I have no other logic, but can't even get this working.  All thoughts.   I also tried the SELECT TYPE = jQuery Selector = select [name = "P110_VESSEL_ID"], but that does not work either (although I am not sure if the value must be P110_VESSEL_ID or static VESSEL_ID name).

    Any help is appreciated.

    PS. the page is not submitted when the ship is changed.  There are other data that should be in this region and others and many validations run when submit to submit would not be an option.

    Thanks again,

    Karen

    Is (BOAT = UNKNOWN) a single value with a single vessel_id? If Yes and for example if the vessel_id is 99, then proceed as follows:

    Add an expression "JavaScript" in your dynamic action.

    In the Condition value, enter:

    this.triggeringElement.value == "99"
    

    -Jeff

    And I agree with Nicolette, there is something wrong with some other DA who is at the origin of the DAs after that does not work.

  • Using AJAX code for the conditional selection list.

    Hello

    I use AJAX code for the first time, I have no knowledge in java, I got the code from this forum and try to manipulate my requirement.

    My requirement is that I have two selection lists, host_name) 1 and 2) database_name.
    As soon as I pick/choose the value of host_name select list, I need to fill in only the databases on this particular host. I don't want to send the page for this action.

    Here is the code, thank you if anyone can help.


    On request the code application process:
    -----------------------------------------------------
    declare
    number of l_counter;
    l_o_name varchar2 (2000);
    Start
    owa_util.mime_header ("text/xml", FALSE ");
    HTP.p ('Cache-Control: non-cache');
    HTP.p ('Pragma: non-cache');
    owa_util.http_header_close;
    HTP. PRN ("< select > '");
    for rec in (select "ORA_DATABASES_VW". "' Database_name ' as 'database_name ',.
    'ORA_DATABASES_VW '. "" DB_ID "as"DB_ID ".
    of 'ORA_DATABASES_VW '.
    where 'ORA_DATABASES_VW '. ("' HOST_NAME ' =: TEMP_ITEM)
    loop
    HTP. PRN ("< option value ="' | rec.db_id |) '">' || Rec.database_name | ("< / option >");
    end loop;
    HTP. PRN ("</select > '");
    end;

    Header HTML on this page:
    =================
    < script language = "JavaScript1.1" type = "text/javascript" >

    function get_List_XML (source_item, target_item) {}

    var v_Target = html_GetElement (target_item);
    var v_Source = html_GetElement (source_item);
    var ajaxResult = new htmldb_Get (null, & APP_ID, 'APPLICATION_PROCESS = POPULATE_LIST_XML', 0);
    ajaxResult.add ('TEMP_ITEM', source_item.value);
    var v_result_xml = ajaxResult.get ('XML');

    If (v_result_xml & & v_Target)
    {
    var options_Contents = v_result_xml.getElementsByTagName ("option");
    v_Count = options_Contents.length;
    v_Target.length = 0;

    for (var i = 0; i < v_Count; i ++)
    {
    var v_opt_xml = v_result_xml.getElementsByTagName ("option");
    appendToSelect (v_Target, v_opt_xml.getAttribute ('value'), v_opt_xml.firstChild.nodeValue)
    }
    }

    }
    function appendToSelect (target_item, option_val, option_content) {}
    var v_Opt = document.createElement ("option");
    v_Opt.option_value = option_val;
    {if (document. All)}
    target_item.options.Add (v_Opt);
    v_Opt.innerText = option_content;
    } else {}
    v_Opt.appendChild (document.createTextNode (option_content));
    target_item. AppendChild (v_Opt);
    }
    }
    < /script >


    Attribute of the form in the host_name column element. P935_INSTANCE_DB_NAME is my page for database_name.
    OnChange = "get_List_XML (this,"P935_INSTANCE_DB_NAME").

    Feel free to mark the answers useful or correct ;)

  • The hide/show button with the AJAX selection list

    I have the button named "QUERY" and AJAX list selection page #2 'ID'. When my selection list value is 100, I would like to display the button, otherwise hide the button. I checked the session values are defined correctly for the selection list when I change the value, but the following code in one of the messages in the forum does not work. is it different for elements of AJAX?

    Added the following code to select the list - onchange = "disble_enable_button (); »

    function disble_enable_button() {}
    If x$ ('P2_ID') .value = '100'
    x True $('P2_QUERY') = true;
    for other x $('P2_QUERY') true = false;
    }

    Hello

    function disble_enable_button() {
    if ($v('P2_ID') == '100')
    $x_Show('P2_QUERY');
    else $x_Hide('P2_QUERY');
    }
    

    Mike

  • problem in the multiple selection list

    Hello...

    That's my problem... We have a few values in session selection multiple list... these values are highlighted in the list... If wen I try to hide the list im unable to do? I think that its because of the session... wat shal I do nw?

    function hidelist()
    {
    document.getElementById('item_name').style.display = 'none ';
    }

    function showlist()
    {
    document.getElementById('item_name').style.display = 'block ';
    }





    David

    Hi David,

    It is difficult to know what can happen that I can't see your page - this error message indicates that javascript can not see the page element to which you are referring to.

    For example, if I make document.getElementById("ABC").style.display, but the article did a 'BCD' ID I would get this error.

    So, the first thing to check is that the list item is the ID that you think it does. Load the page and do a view Source. Find the selection list and check to see how ID attribute there. If it contains the right ID attribute, then it might be easier if you could save the page view Source and send it to me at... so I can watch it.

    Andy

  • How can I set size of the document to view in pixels?

    Hello

    I use the version of Photoshop CC 2015.0.0.  I'm working on a .jpg file.  Bottom left of the Photoshop window, the size of this file are displayed in inches.  If I click on this size screen, I get a popup that says the dimensions in pixels, but I really prefer if the dimensions have been displayed in pixels by default.  Can someone tell me if there is a way I can get there?

    Thanks in advance,

    Paul

    Choose View > rules

    Right-click on the rule at the top of the image

    Choose Pixels and the two leaders and the note at the bottom of the image will be displayed in pixels

  • Creation of Validation for the multiple selection list or shuttle point

    Hello
    I'm new to APEX and have questions about the best way to validate the selected shuttle items to verify that they exist in the sys.dba_roles table before submitting. The shuttle point uses a static LOV. I would like to than the error message to display when there is no such thing as a role selected in the element of the shuttle in the sys.dba_roles table.

    Using version 3.2 of APEX
    DB version 9.2.0.8.0
    Internet Explorer version 6

    I tried to create a validation step level about to shuttle P3_ROLE using SQL EXISTS when you press the button SUBMIT. I know that when argued that the shuttle point returns the selected values in a single string delimited by a colon. I use the APEX_UTIL. STRING_TO_TABLE to convert values selected in a table.

    CODE HERE
    declare
    l_selected APEX_APPLICATION_GLOBAL. VC_ARR2;
    number of l_num;
    Start
    l_selected: = APEX_UTIL. STRING_TO_TABLE(:P3_ROLE);
    BECAUSE me IN 1.l_selected. COUNTY
    LOOP
    Select 1 from l_num of sys.dba_roles where role = l_selected (i);
    END LOOP;
    end;

    This is the error ORA-00928: lack of SELECT keyword
    1006 - ERR error in the validation routine.

    Any advice? Thoughts? Thank you.

    Published by: Violet on Oct 14, 2010 14:50

    Hello

    Your code is PL/SQL block. You cannot use this type of validation with your code.

    Try to change the body type of the function that returns the error text and
    code for this one

    DECLARE
      l_selected APEX_APPLICATION_GLOBAL.VC_ARR2;
      l_num NUMBER;
    BEGIN
      l_selected := APEX_UTIL.STRING_TO_TABLE(:P3_ROLE);
      FOR iIN 1..l_selected.COUNT
      LOOP
        SELECT count(1) INTO l_num FROM sys.dba_roles WHERE role = l_selected(i);
        IF l_num = 0 THEN
          RETURN 'Role not exists';
        END IF;
      END LOOP;
      RETURN NULL;
    END;
    

    Kind regards
    Jari

  • How to use the multiple selection list values in sql query

    Hi all
    In the search form, I have a multiselect llist tell (P3_STATUS) and I want to have a query using this element and fetch documents
    How to do a sql query based on the selection of the value of this element.
    SELECT "W"."START_DT" "Start Date",
           "W"."CAMPAIGN_CODE" "Campaign Name",  
           "W"."MKT_CHANNEL" "Channel",
           "W"."MKT_SUB_CHANNEL" "Sub Channel", 
           "W"."PROMO_CODE" "Promo Code",
           "W"."TRACKING_CODE" "Tracking Code",
           "W"."TFN" "TFN",
           "W"."STATUS" "Status",
           "W"."CAMPAIGN_CODE" "Edit"
           FROM 
             "WC_MKT_CAMPAIGN_DS" "W"
      
           WHERE 
         (MKT_CHANNEL = decode(:P1_CHANNEL,'%null%',MKT_CHANNEL,NULL,MKT_CHANNEL,:P1_CHANNEL))
       AND
    (MKT_SUB_CHANNEL= decode(:P1_SUB_CHANNEL,'%null%',MKT_SUB_CHANNEL,NULL,MKT_SUB_CHANNEL,:P1_SUB_CHANNEL))
    AND *STATUS = decode(.................*
    Please could someone help me on this?

    Thanks in advance
    Robert L

    Try to change your selection of status to

    AND INSTR(':'||:P3_STATUS||':',':'||STATUS||':') > 0
    

Maybe you are looking for