Apex 3.2 group select list

Hi,
I just want share this if you are still in older version of Apex and you use jQuery.
I did made "plugin" for grouped select list
See sample here
http://actionet.homelinux.net/htmldb/f?p=100:86
Plugin source
;(function(){
jQuery.fn.htmldbLovOptGrp=function(o){
var t=jQuery(this);
o=jQuery.extend({
  sessionValue:t.val(),
  nullShow:false,
  nullValue:'%null%',
  nullDisplay:'%',
  lovProcess:undefined,
  lovGrpLabel:'GRP',
  lovDisValue:'DIS',
  lovRetValue:'RET',
  loadingTxt:'Loading ...',
  loadingCss:{'width':'80px'}
},o);
return lCreSelect(t,o);
jQuery.htmldbAjax=jQuery.fn.htmldbAjax=function(opt){
jQuery.ajaxSetup({
  url:'wwv_flow.show',
  dataType:'HTML',
  traditional:true,
  cache:false,
  type:'POST',
  data:{
   p_flow_id:jQuery('#pFlowId').val(),
   p_flow_step_id:jQuery('#pFlowStepId').val(),
   p_instance:jQuery('#pInstance').val()
return jQuery.ajax(opt);
jQuery.htmldbJSON=jQuery.fn.htmldbJSON=function(opt,callfn){
return jQuery.htmldbAjax({dataType:'json',data:opt,success:callfn});
function lCreSelect(t,o,j){
t.empty().hide().parent().append(jQuery('<div/>').html(o.loadingTxt).addClass('ui-autocomplete-loading').css(o.loadingCss));
jQuery.htmldbJSON(jQuery.extend(j,{p_request:'APPLICATION_PROCESS='+o.lovProcess}),function(jd){
  if(o.nullShow){lAppendOpt(t,null,o.nullDisplay,o.nullValue);}
  jQuery.each(jd.row,function(i,d){lAppendOpt(t,d[o.lovGrpLabel],d[o.lovDisValue],d[o.lovRetValue]);});
  t.val(o.sessionValue).trigger('change').show().parent().find('div.ui-autocomplete-loading').remove();
  return t;
function lAppendOpt(t,l,d,r){
var o=lCreateOpt(d,r);
if(l){
  var g=lGetOptGrp(t,l);
  if(g){g.append(o);}
  else{t.append(lCreOptGrp(l).append(o));}
}else{t.append(o);}return true;
function lExists(p){return(p.length==1);}
function lCreateOpt(d,r){return jQuery('<option/>').val(r).html(d);}
function lCreOptGrp(l){return jQuery('<optgroup/>').attr({'label':l});}
function lGetOptGrp(t,l){var g=t.find('optgroup[label="'+l+'"]');if(lExists(g)){return g;}else{return false;}}
})();Copy code and save it to file e.g called jquery.htmldbQuery.js and upload it to workspace Static Files.
Create new page and blank HTML region.
Create select list with LOV query
SELECT null d, null r FROM dualCreate On Demand application process called GET_GRP_LOV like
DECLARE
l_sql VARCHAR2(32700);
BEGIN
l_sql :='
  SELECT mgr AS grp,
   ename AS dis,
   empno AS ret
  FROM emp
APEX_UTIL.JSON_FROM_SQL(l_sql);
END;Place to page HTML header
<script type="text/javascript" src="#WORKSPACE_IMAGES#jquery.htmldbQuery.js"></script>
<script type="text/javascript">
$(function(){
$('#Px_MY_SELECT').htmldbLovOptGrp({lovProcess:'GET_GRP_LOV'});
</script>Where Px_MY_SELECT is your select list name.
As I did say this need you also load jQuery. Apex 4 have jQuery , but if you are on later version see e.g. this blog post
http://www.oracleapplicationexpress.com/tutorials/66
I hope this helps someone
Br,Jari
Edited by: jarola on Aug 17, 2010 8:44 PM
Same thing seems to be work also with Apex 4.0
http://apex.oracle.com/pls/otn/f?p=40323:50
But if I have understand correctly Apex 4.0 have some build in or better thing to get same result
Edited by: jarola on Aug 17, 2010 10:54 PM
copy&paste mistake corrected
Edited by: jarola on Aug 18, 2010 12:57 AM
I hope editing post all the time is ok =).
I have not test this on any other browser than Fire Fox, so all comments are welcome.
Also I have try create similar plugin for cascading lov. Sample here
http://actionet.homelinux.net/htmldb/f?p=100:85
Maybe there is this kind plugins already for Apex 3.x, I have not just seen.
Also I'm beginner with jQuery so all help and comments is needed
Edited by: jarola on Aug 18, 2010 2:01 AM
mistake in guide corrected.

Hi Matt,
which version of APEX are you currently on?
With ApexLib Framework you can have cascading select lists in normal forms, but not in a Report or Tabular Form. Also refreshing a Report when changing a select list doesn't work out of the box. You would need to add some javascript. But i think this isn't what you wanted.
brgds,
Peter
Blog: http://www.oracle-and-apex.com
ApexLib: http://apexlib.oracleapex.info
BuilderPlugin: http://builderplugin.oracleapex.info
Work: http://www.click-click.at

Similar Messages

  • 'Group Select List' plug-in

    Hello,
    I installed "Group Select List" plug-in from 'Official APEX Plug-Ins by Oracle'. I followed Instalation and How to use steps from readme.txt file.
    And it works. I can see grouped LOV.
    But in new page item there is no attribut 'Page Action when Value Changed'.
    How can I use "Group Select List" with action "Redirect and Set value" (or any other action from list of page actions attribut)?
    Thx

    Hi,
    the plug-in doesn't provide such an option, but you can create a dynamic action for that page item which fires for the change event.
    There you could submit the page or do something else like refreshing a different region.
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Apex 4.0 Cascading Select List: ajax problem with german umlaute

    Hi everybody,
    Apex 4.0
    Dad PlsqlNLSLanguage: GERMAN_GERMANY.WE8MSWIN1252
    I have problems with german umlaute and ajax cascading select lists (Cascading LOV Parent Item).
    The data is populated without a page refresh in the select list when the parent select list changes but special signs like german umlaute are shown as weird characters.
    Seems like there is some charset problem with ajax.
    This is the only part of the application where special signs like umlaute are messed up. Everything else is fine.
    I allready tried to figure out if I can escape the umlaute in the javascript (file apex_widget_4_0.js) but no success here.
    Can anybody help me with this issue?
    Thanks in advance,
    Markus

    Hi Markus,
    your specified character set in your DAD is wrong. As mentioned in the installation instructions at http://download.oracle.com/docs/cd/E17556_01/doc/install.40/e15513/otn_install.htm#CHDHCBGI , Oracle APEX always requires AL32UTF8.
    >
    3. Locate the line containing PlsqlNLSLanguage.
    The PlsqlNLSLanguage setting determines the language setting of the DAD. The character set portion of the PlsqlNLSLanguage value must be set to AL32UTF8,
    regardless of whether or not the database character set is AL32UTF8. For example:Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • Select list works for some users not for others

    Apex 3.2, Oracle 10g
    I have a page with a select list. (other select lists work fine) This view is a based on a view over a dblink with the chain being (public synonym -> dblink view -> dblink real view )
    One user logs into the Apex app and the select list populates.
    I log in to the app, either through the developer login or the app login, navigate to the same page and the select list does not populate.
    What can cause this in Apex or is it a database issue.
    Someone said it may be a rights issue, but I thought all Apex users appeared as the same 'user' to the database.
    Miscellaneous points: The app authentication is via LDAP/OID and I can get the select list code work in SQL Developer.
    Thanks,
    Sam

    not sure what you are asking
    It is a "Select List"
    The sql is
    select x d, x r
    from view
    wher x is not null
    order by 1
    The view is a synonym in the application schema, points to a view on the same database instance (different user) which points to the real view via dblink to a different database instance.

  • Select list / Pop up box - Read only ??

    Hi all,
    I have a select list to populate a field in an ApEx application. The select list is populated by a query on a table and as such there is no option to input any non-standard items via free text into that field - all values must be chosen from the select list.
    My issue now is that the select list is getting quite large and is really not the easiest way to select data from a list.
    A popup LOV is perfect for the searching through available values but it leaves the text box available for "free text input", allowing non standaerd data to be entered into that field.
    Is there any solution to this?

    Neil,
    You can use Validation to enforce correct entry. The approach I use is to use custom popup. See example below:
    http://www.oracle.com/technology/products/database/application_express/howtos/how_to_create_custom_popups.html
    You can set the text box's attributes to readonly="true". This will keep the textbox disabled thereby preventing free form data entry. Users will be forced to pick data from the custom popup page.
    Ravi

  • Can a Tree be used as a Select List?

    Hi
    I'd like to use a tree structure in APEX as an interactive 'Select List Item' or a Menu component.
    When users click on a particular tree node, the selection will be highlighted and it's associated PID from the underlying query can be accessed to filter a Report.
    Is this possible?
    Thanks
    Greg

    Hi Andy
    I had hoped to use the normal APEX tree item to drive interactive user selection.
    The tree report in APEX seems a bit limited for this requirement. I'm unable to click on individual leaf elements.
    The tree list shared component, on the other hand, gives me this functionality. Unfortunately, there does not seem to be a way to populate a list from query?
    I've found Scott Spendolini's AJAX tree, which I'm trying to implement and test to see if it suits my requirements, however, I'd prefer to use internal APEX features, if it all possible.
    Please let me know APEX caters for this.
    Many thanks
    Greg

  • Set Radio Group Default Value Based on a Select List Change Event

    Apex 4.2
    I have a radio group that is source is below. It returns 3 radio group item All,Miv,Courier
    SELECT type d, code r FROM vw_lov_depot
      WHERE svc_name = :P320_DEPOT
      ORDER BY 1
    The radio group is only populated when :P320_DEPOT gets a value, this is a select list.
    I am trying to set the radio group to  default to this value Miv it would use the statement
    SELECT type d, code r FROM vw_lov_depot
      WHERE svc_name = :P320_DEPOT
      and type ='Miv'
      ORDER BY 1
    I have tried creating a dynamic action on Select list change to populate the default value of the radio group...no joy I also tried a computation. how can I set this default value on when list changed.
    Thanks
    I have got the default Radio Group Selection working by doing a computation before region on the radio group and calling its select statement and setting the value. But the problem is now I cannot change the radtio group as I do it fire the before region trigger and sets it back to the default value....any help?

    Hi,
    Could you please create example to apex.oracle.com?
    Regards,
    Jari

  • Select List Performance Issue in Apex 3.1.2

    Hi
    It would of great help if you could suggest us for the following
    We are facing some issues in Select List performance in Apex 3.1.2 version.
    We have 6 select list and all have been cascaded i.e., values of each select list based on pervious list value.
    Values in each select list are huge. Because of this, the performance is very slow.
    It takes huge time to fetch the data based on other list values.
    We cross verified in backend, the same query takes less time compared to the Application.
    Any recommedation to fine tune this?
    Thanks in advance
    Vijay

    if your select lists are very huge then it could be the browser that is causing the slow down.
    try and create an example using a static HTML file containing a select list of the same size and you may find the same performance issue.
    a quick way to create the test would be to save the source of your APEX page as a html file
    Craig
    [http://www.oracleapplicationexpress.com]

  • APEX 4.0.2 Multi-selection on a cascade LOV select list only pass 1 value

    Hello everyone,
    I am struggling to make a cascading LOV select list has multi-selection.
    On one report page.
    I have 2 select list
    The first one lists the court name (P4_COURT_NAME), the second one (P4_DEFENDANT) list all defendants who currently engaged in the court.
    The problem is when I allow the defendant select list become multi-select, when it submit it only pass the first selected value.
    So I create just a simple select list based one list of value, and make it allow multi-selection. When it submit, the normal select list can pass selected values properly, while the cascade LOV select list pass only the first selected value.
    Please help if any of you have an idea why.
    We use APEX 4.0.2.00.07, Oracle data version iis 11g
    The some configuration settings I set for the P4_DEFENDANT IS
    Value required: Yes
    Page Action When value changed: None
    Allow Multi Selection: Yes
    Named LOV: --Select Named LOV-
    Display Extra value : Yes
    Display Null Value: Yes
    Null Display Value: --Select—
    Null return value:
    Cascading LOV Parents Items: P4_COURT_NAME
    Page Items to Submit: P4_DEFENDANT
    Optimize refresh: YES
    List of value definition
    SELECT def.first_name || ' ' || def.surname || ' (PRN: ' || def.prn || ' )' as d, def.def_id as r
    FROM defendant def INNER JOIN court_engagement ce
      ON def.def_id = ce.defendant_id
    WHERE (ce.date_joined_aodt_court IS NOT NULL
      AND (ce.date_terminated IS NULL OR to_date(ce.date_terminated,'dd/mm/yyyy') > to_date(sysdate,'dd/mm/yyyy'))
      AND UPPER(ce.court_name) LIKE UPPER(:P4_COURT_NAME)
      AND ce.active = 1)Source Used: Only when current value in session state is null
    Source Type: Static Assignment
    Maintain session state: Per session
    The rest is default.
    Thanks in advance.
    Ann

    Hi Chintan,
    The "Source used" for those items are "Always, replacing any value in the session state". To set them to "Only when current value in session state null" sounds a good solution to me.
    However, a strange thing just happened - now I will not lose the values of the items after the page reloading, although I have changed nothing in the page in my application since I asked the question. I don't understand why all of a sudden the reloading doesn't make me lose changed values any more. Let me dig it tomorrow to see what I'll find.
    Thanks so much for your help.
    Christine

  • Inserting checkbox into a APEX select list

    After aloooottt of time spend in google and script foruns, i found a way to transform the simple APEX select list into a multiselec combobox with checkbox inside. Its working prety cool, and its not so hard to implement.
    I´m sry if someone alread post it before, but, due to the time spend it on it, i know that is a bit hard to found.
    If someone is looking for that too, i can share all my work into this. I will be glad to help.
    just send me a email [email protected] or ask here on forum.
    Tnks to all who help me on this "quest" lol.

    Good to hear. If you have an account on apex.oracle.com you can put your demo there for everybody to see. If not, just create an account.

  • Dynamic select list as APEX plug-in custom attribute?

    I'm developing a region plug-in in APEX 4.0.1. I wanted to make one of the custom attributes a select list where the options offered were the current application list templates (queried from the <tt>apex_application_temp_list</tt> view: the rendered plug-in region should be styled using a standard list template from the current theme). However, the Select List plug-in custom attribute type only appears to support static lists. Can anyone confirm that I've not missed anything and that this is indeed the case?
    If so, it seems that the plug-in will have to rely on developers typing a list template name into a text box, which is far from ideal. (Unless anyone can suggest a workaround?)
    Component specific templates can be applied to several built-in component types&mdash;lists, calendars, reports&mdash;so it would make sense for there to be a similar capability for plug-ins where these are congruent with an existing template type, e.g. by providing a Template Picker plug-in custom attribute type.

    Hi,
    you have not missed anything. Plug-in attributes of type "Select List" just support static values. And I'm not sure if a query based Select List would really help, because what happens if the template is deleted. Or in the reports where it shows if the template is in use.
    So I think your second approach to extend plug-in attributes to link to certain shared components (Lists, Templates) is the better way forward, because that will also allow us to know what you are actually referencing and we can use that information in reports, delete operations, ...
    Will add it to possible enhancements for 4.1
    Regards
    Patrick
    My Blog: http://www.inside-oracle-apex.com
    APEX 4.0 Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • APEX 4.01 Tabular form with select list error

    When i create a tabular form and i add a select list(query based LOV) the form is not displayed but gives me the next error
    report error:
    ORA-20001: Error fetching column value: ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    somebody have an idea what is happening here
    is this still a bug in APEX 4.01?
    hope to have an answer soon.
    Hugo Perfors

    Hi Jari,
    It returns about 1100 records which i think is not much.
    But even when i narrow the amount of records the problem is not solved.
    it this a bug?
    Best
    Hugo

  • Select list populated with ldap group membership attributes

    Is it possible to query an LDAP group and retrieve all the members of the group?
    For example, if I have an LDAP group with members' login name, I want to retrieve all login names and populate a select list so the end-user can choose a login name from the group.
    Thanks, alan.

    The problem is the second query. I would guess that the TO_CHAR(co) is not unique for each account, but is the same for the accounts. And as the second item in the select-list is the listitems values, all your listitem-entries have the same value. therefore, of you select any entry, the list will always go the the first entry again.
    Adjust your query.

  • Apex Select List

    Hi,
    In my application. I have a requirement like the below
    one select list is there where iam displaying the country name returning country code.
    another select list i have a province name displayed returning the province code.
    Now my requirement is when i select country name another province select list should show only the province names belongs to that country dynamically,
    created dynamic action and wrote plsql function on change event to set value as follows but no luck please advice.
    IF :LANG_PREF_CD = 'E' THEN
    RETURN 'SELECT province_name
    , province_id
    FROM (SELECT E_province_name province_name
    , province_id province_id
    FROM province_table
    where province_table.country_id=:p1_country_name
    UNION ALL SELECT 0, '' '', NULL FROM DUAL )
    ORDER BY province_id;
    ELSE
    RETURN 'SELECT province_name
    , province_id
    FROM (SELECT f_province_name province_name
    , province_id province_id
    FROM province_table
    where province_table.country_id=:p1_country_name
    UNION ALL SELECT 0, '' '', NULL FROM DUAL )
    ORDER BY province_id;
    END IF ;
    can any one help where is the mistake please. thanks

    Hi,
    not sure for older versions but for > Apex 4.0 this is possible "out of the box".
    Define 1 list of values called country and set this as the LOV on your country field ( e.g. P11_COUNTRY ).
    Define a second field called P11_PROVINCE and set Cascading LOV Parent Item(s) to P11_COUNTRY, also set Page Items to Submit to P11_COUNTRY
    now define the list of values for the P11_PROVINCE in the List of values definition on the item page ( so not a named LOV since you shoudlk reference a page item ):
    select
         province,ID
    from provincelovtable
    where
    and country_id = :P11_COUNTRY
    The field country_id should contain the country id where the province is linked to.
    regards
    Bas

  • XE APEX 2.1 Select list

    Hello,
    An Oracle and APEX newbie here, running 10g XE.
    I have a report on pg 1 with a link to page 2 for editing a row (in a view).
    On pg 2 is a select list generated from a dynamic LOV from another table.
    select reminder_type_desc rt_desc, reminder_type_id rt_id
    from reminder_type
    Yes, this reminder_type table is just a domain/lookup table (not sure the correct terminology for Oracle here).
    The issue Im having is figuring out how to get the select list to select the value in the LOV that matches the value in the row from the view - all other data is correct.
    I have a hidden item used to pass the id of the row to page 2, but not sure how to use it to get the correct value from the select list. I see other posts on this referring to using the 'Source' area of the page definition, but I'm not sure how to structure the SQL query.
    Any help appreciated,
    Thanks
    John

    If your page is a form using our built in dml (if you creating it using a wizard), for the item you want to have an lov on, simply:
    1) Under Name, set the display type to Select list
    2) Under Source, set the Source Type to Database Column
    3) Under Source, set the Source value or expression to the name of the database column
    4) Under List of Values, select the Named LOV you created (or you can use an item-level lov, you enter that in List of values definition)
    5) Under List of Values, set Display Extra Values to Yes only if this is not a true foreign key - meaning, your value might not be found in the lov query
    6) User List of Values, set Display Null to Yes only if the column can be null. If you do set to Yes, you should enter a Null display value (such as - select value - or - no value selected -)
    That is the 'newbie' set of instructions. In overview, If you have a database column and associate an lov with it, we automatically display the proper value based upon what is in the database. You don't need to hide the actual database column and then have another item with the lov.
    Hope it helps -
    -- Sharon

Maybe you are looking for

  • Satellite L775 goes into BSOD after upgrade to Win 8.1

    hello First, I have win7 on this device, then I purchased a mictosoft windows 8 pro for it. When I upgraded it went fine for a few months and then it started to crash on its own. I tried so much to rebuild the PC using Toshiba's software to no avail.

  • Agent service on Windows does not start

    Ok: Grid Control 10.2.0.1, repository 10.1.0.4, Linux Red hat 4 Target node is a windows 2003 server (kinda, its on VMWare) with no service pack installed (don't ask). There is no oracle software on the target node except an oracle 10.2.0.3 agent. We

  • Bill of Lading : Forwarding Agent/Carrier data

    Hello, On Bill of Lading report no data are displayed in 'Forwarding Agent/Carrier' section. Which kind of data do I have to setup to displayed data in this section ?

  • Flash 8 Movie Link Problems...

    Ok I have created a short flash vid for my front page all works as planed and on the last scene I have put in 3 buttons. These links direct to the same page and that work fine. I then finished the page these link to and I want to direct there link di

  • Cluster 3.1 4/04 install problems

    When my major node reboots I was getting the error: Trying to remount /global/.devices/node@2 mount: /dev/md/dsk/d50 is already mounted, /global/.devices/node@2 is busy, or the allowable number of mount points has been exceeded WARNING - Unable to mo