'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

Similar Messages

  • 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

  • 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

  • "Headers" or disabled items in select list.

    This used to work...
    SELECT d, r
    FROM (SELECT tr.description d, TO_CHAR (tr.ID) r,
    tgr.description grouporder, tr.description toolorder
    FROM hr.bi_tools_reg tr JOIN hr.bi_tools_group_reg tgr
    ON tr.GROUP_ID = tgr.ID
    WHERE tr.ID NOT IN (
    SELECT brc.comp_id
    FROM hr.bi_register_competence brc
    WHERE brc.user_name = :app_user
    AND brc.comp_type_id = 2
    AND brc.comp_id IS NOT NULL)
    UNION
    SELECT '   ---' || tgr.description || '---' d, ID || '" disabled="disabled' r,
    tgr.description grouporder, 'a' toolorder
    FROM hr.bi_tools_group_reg tgr)
    ORDER BY grouporder, toolorder
    Creating a list of greyed-out ---Description--- in the second select and the selectable items in the first select and then merging them into one list in the proper order. Resulting in a list with headers that are non-selectable and a number of selectable items below each of them...
    Suddenly It doesn't work anymore (with ie 8.0.7600 and APEX 4 as opposed to working in 8.0.6001 and APEX 3.2.1)
    the workin header rows look like this in the html source
    <option value="3" disabled="disabled">   ---Microsoft---</option>
    and in the newer ie they look like this:
    <option value="3&quot; disabled=&quot;disabled">&amp;nbsp;&amp;nbsp;&amp;nbsp;---Microsoft---</option>
    Any ideas on how to get around this?

    This is due to select list <tt>option</tt>s now being HTML-escaped in APEX 4.0. See +{thread:id=2126522}+
    Use the -capable select list plug-in<tt>optgroup</tt>-capable select list plug-in instead.
    (When posting code, please \...\wrap it in <tt>\...\</tt> tags.)

  • 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 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.

  • Not Allowing a Value to be Selected in a Select List

    Version 4.1.1.00.23
    Hello,
    I've created a Select List to display Projects within a Department (we call them Groups).
    A Group will have Projects, however, more than one Group can have a Project with the same name.
    So my query for the Select List displays the data in a Hierarchical format like this:
    Group 1
        Proj Grp 1
        Proj Grp 1
        Proj Grp 1
        Proj Grp 1
        Proj Grp 3
    Group 2
        Proj Grp 1
        Proj Grp 1
        Proj Grp 2
        Proj Grp 2
    Group 3
        Proj Grp 1
        Proj Grp 2
        Proj Grp 3
    What I'm looking for is to NOT allow the 'Group' level to be selected within the list. Only allow the Project level values to be selected.
    The query is:
    WITH t
         AS (SELECT 'Group: ' || vg.group_name name
                   ,vg.group_id
                   ,NULL id
                   ,1 AS weight
             FROM   vertical_group vg
             WHERE (vg.group_id = :P100_GROUP OR :P100_GROUP = 0)
             UNION ALL
             SELECT '....' || project_name
                   ,group_id
                   ,project_id
                   ,2 AS weight
             FROM   tbs_projects
             WHERE  status IN ('Pipeline'
                              ,'Planned - Partially Funded'
                              ,'Planned'
                              ,'Execution') AND
                    ( :P100_RYG_PROJECT = 0 OR :P100_RYG_PROJECT = ryg_proj_id ) AND
                    ( group_id = :P100_GROUP OR :P100_GROUP = 0 ))
    SELECT name
          ,id
    FROM   t
    ORDER BY group_id
            ,weight
            ,name
    Can someone help me with this?
    Is there additional information I can provide?
    Thanks,
    Joe

    The HTML optgroup element is used to structure select lists in this way. Standard APEX Select Lists and LOVs do not have support for generating optgroup elements in option lists, but item plug-ins with this feature are available.
    See the documentation for more on using plug-ins.

  • Display all records from 4 select list

    Hi,
    trying to associate 4 select list where i could display all records from a list linked to an other list.
    1./ Created an item for each select list
    P1_employee_name
    P1_departments
    P1_employee_type
    P1_locations
    2./Set both null and default values to '-1' for each item
    3./Associated these items to source columns in the Region:
    where employee_name=:P1_employee_name
    or :P1_employee_name ='-1'
    and departments=:P1_departments
    or :P1_departments ='-1'
    and ......
    When running the report, couldn't display all records from a given list associated to an other list.
    e.g: Display all emp and type of emp for sales dept in Paris.
    Thks for your help

    I believe the issue is that you need to group your predicates such as:
    where (employee_name=:P1_employee_name
    or :P1_employee_name ='-1')
    and
    (departments=:P1_departments
    or :P1_departments ='-1')
    Also, if you are not already using the "select list with submit" type items, these work great for this case as the page will be submitted when the user changes the value of employeenam and the report will then reflect this change.

  • Change display value of "select list"

    Hi!
    I have a problem with a select list, I want to change the display value through an own pop up (page 5 of apex application) after I submit in it.
    The select list is based on a sql query:
    select A_NAME display_value, A_ID return_value
    from APPLICATIONS
    where a_application_type='GROUP'
    order by 1
    beside I have an link to open a pop up window:
    ... onClick="window.open ('f?p=&APP_ID.:5:&SESSION.::::', 'newWin',
    'scrollbars=no,status=no,width=500,height=270' ...
    On the pop up site there is a tree and a submit button which close the window and renew the original page:
    javascript:window.opener.location.reload();window.close();
    Through the tree I get the value (Group-ID) which I need.
    When I'm back on page 4 a "before header" renew page process links again on the side 4 and change the value of my select list. Afterwards the values have changed correctly but the display value is still the old one. It only change when i go on an other page of the apex application and come back.
    I don't know why it doesn't change immediately!?
    Thanks ahead

    I have done with a solution just in a nutshell of what u r looking for:
    1.create HTML region.
    Add two items : Select list with redirect(P6_X) and text field(P7_X)
    2. Select list is based on LOV query as :
    select empno d,empno r from emp ;
    Source value is Empno Type:DBcolumn.
    3.The text field Source type : SQL Query .
    Query : select ename from emp where empno = :P6_X
    Now select from the dropdown empno and it will populate the Ename value accordingly based on the query .
    U can have more than one text fields and populate those in the same way.....
    Cheers,
    ROSY

  • Report with select list and link to call another report

    Hi,
    I am trying to do 2 reports (REPORT1 and REPORT2).
    The first is a summary report (REPORT1).
    This report will display sales figures for the year. Now, I need to have a select list in the result set that will have 2 options, depending on which option is chosen, I want to call REPORT2 with the select list as a parameter. How can I do this ?
    Let me try to explain what I did.
    I created REPORT1 on Page 100
    SELECT YEAR, sum(YTD_SALES), APEX_ITEM.SELECT_LIST(1,'DEPARTMENT','Department;DEPARTMENT,Division;DIVISION') Drilldown FROM SALES_ANALYSIS WHERE YEAR > 2000
    GROUP BY YEAR ORDER BY YEAR
    I created 2 hidden items namely P100_YEAR and P100_DRILLDOWN
    I also made the column YEAR as a link and specified both P100_YEAR and P100_DRILLDOWN as parameters to be passed.
    Next, I created REPORT2
    SELECT YEAR, DECODE(:P100_DRILLDOWN, 'Department', department, 'Division', Division) dept_div, sum(YTD_SALES) ytd_sales
    FROM SALES_ANALYSIS
    WHERE YEAR = :P100_YEAR
    When I run Report 1, it's fine, when I choose either Department or Division from the Select List and click on the link to call Report 2, report 2 is displayed, but the value being passed for P100_DRILLDOWN is not correct and as a result, I am unable to get correct results for Report 2
    Am I missing something ? Are there any alternate ways to do what I'm doing ?
    Thanks,
    Ashok

    Hi Ashok,
    The link definition will not know the value selected in the list as it is constructed only when the page is being rendered. You would need to create some javascript to handle this. I've done that here: [http://apex.oracle.com/pls/otn/f?p=267:182]
    The link on the EMPNO column has been defined in the HTML Expression setting for the column instead of the Link section. The HTML Expression that I have used is:
    &lt;a href="#" onclick="javascript:doDrilldown('#EMPNO#',this);"&gt;#EMPNO#&lt;/a&gt;And, in the page's HTML Header setting, I have added in:
    &lt;script type="text/javascript"&gt;
    function doDrilldown(empno,group)
    var g;
    var p = group.parentNode;
    while (p.tagName != "TR")
      p = p.parentNode;
    var x = p.getElementsByTagName("SELECT");
    if (x.length &gt; 0)
      g = x[0].value;
    var url = "f?p=&APP_ID.:183:&SESSION.::::P183_EMPNO,P183_GROUP:" + empno + "," + g;
    document.location.href = url;
    &lt;/script&gt;When a link is clicked, the doDrilldown function is called passing in the EMPNO value and the "this" object (which identifies the object triggering the call). The function starts from that object and goes up in the HTML tag tree to the nearest TR tag (the row tag that the link is on) and then finds the first SELECT list item on the row and gets its value. It then constructs a URL using this and the EMPNO value and performs a redirect to the second page (page 183 in this example).
    Andy

  • Multiple Select List looping thru PL/SQL function body returning SQL query

    Hi,
    I have a Multiple Select List. I want to loop through the values from the Select List and process them in a PL/SQL function body returning a SQL query. Currently, my code only returns the SQL SELECT results of one item in the select list. How do I change my code to make it return the results of all of the items in the select list? (I tested it and it is definitely picking up all the values in the select list).
    <b>
    DECLARE
    selected_items HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
    s   VARCHAR2(20);
    q varchar2(32767);
    BEGIN
    selected_items := HTMLDB_UTIL.STRING_TO_TABLE(:P50_SELECTED_INSTRUMENTS);
    -- htp.p('COUNT: '||selected_items.count);
      FOR i in 1..selected_items.count LOOP
      s := TO_CHAR(selected_items(i));
    -- htp.p('First: '||s);
    -- htp.p('Second: '||:s);
    -- htp.p('Third: '||TO_CHAR(selected_items(i)));
      q:= 'SELECT  '||
    'SUBSTR(orig_geo_loc_sys,1,INSTR(orig_geo_loc_sys,''-'')-1) AS INSTRUMENT, '||
    'SUBSTR(orig_geo_loc_sys,INSTR(orig_geo_loc_sys,''-'')+1, LENGTH'||
    ' (orig_geo_loc_sys)) AS ORIG_LINENUM, '||
    'sum(orig_intrl) orig_intrl, '||
    'sum(orig_extrl) orig_extrl, '||
    'sum(recv_intrl) recv_intrl, '||
    'sum(recv_extrl) recv_extrl '||
    'FROM line_usage_sum_view '||
    'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''' || s ||'%'' '||
    --'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''2213003%'' '||
    'AND switch_id = ''' || :P1_SWITCH_ID || ''' ' ||
    'AND call_start_date > TO_DATE(''30-NOV-1999'') ' ||
    'AND call_clear_time > TO_DATE(''30-NOV-1999'') '||
    'AND '||
    :SORTFIELD||' BETWEEN '||
    'TO_DATE(:STARTDATE,''dd-MON-YYYY HH24:MI'') AND '||
    'TO_DATE(:STOPDATE, ''dd-MON-YYYY HH24:MI'') '||
    'GROUP BY GROUPING SETS (orig_geo_loc_sys)';
    -- htp.p('SQL query: '||q);
      RETURN q;
      END LOOP;
    END;</b>
    Thank you,
    Laura

    Laura,
    First, I would be careful of introducing SQL Injection possibilities. Any time I see
    'Select ... ' || :P123_FOO || ' ... '
    I worry about sql injection. In your case you are converting :P50_SELECTED_INSTRUMENTS into selected_items and then selected_items into s. So when I see
    'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''' || s ||'%'' '||
    I think, "I could use sql Injection and hack this."
    So, I would do some validation on :P50_SELECTED_INSTRUMENTS or some other method to avoid this.
    I'm not certain I understand your query. Do you really intend to allow the user to select the beginning of a string and then find all rows that start with that string? Or, do you just want to let them find when it matches the string. This is one way if you want to do matching:
    DECLARE
    selected_items HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
    s VARCHAR2(32767);
    q varchar2(32767);
    BEGIN
    -- Change the : separate string to be comma separated with quoted strings
    s := '''' || replace(:P50_SELECTED_INSTRUMENTS, ',', ''',''')|| '''' ;
    -- htp.p('COUNT: '||selected_items.count);
    q:= 'SELECT '||
    'SUBSTR(orig_geo_loc_sys,1,INSTR(orig_geo_loc_sys,''-'')-1) AS INSTRUMENT, '||
    'SUBSTR(orig_geo_loc_sys,INSTR(orig_geo_loc_sys,''-'')+1, LENGTH'||
    ' (orig_geo_loc_sys)) AS ORIG_LINENUM, '||
    'sum(orig_intrl) orig_intrl, '||
    'sum(orig_extrl) orig_extrl, '||
    'sum(recv_intrl) recv_intrl, '||
    'sum(recv_extrl) recv_extrl '||
    'FROM line_usage_sum_view '||
    'WHERE TO_CHAR(orig_geo_loc_sys) in (' || s ||' ) '||
    --'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''2213003%'' '||
    'AND switch_id = ''' || :P1_SWITCH_ID || ''' ' ||
    'AND call_start_date > TO_DATE(''30-NOV-1999'') ' ||
    'AND call_clear_time > TO_DATE(''30-NOV-1999'') '||
    'AND '||
    :SORTFIELD||' BETWEEN '||
    'TO_DATE(:STARTDATE,''dd-MON-YYYY HH24:MI'') AND '||
    'TO_DATE(:STOPDATE, ''dd-MON-YYYY HH24:MI'') '||
    'GROUP BY GROUPING SETS (orig_geo_loc_sys)';
    -- htp.p('SQL query: '||q);
    RETURN q;
    END;
    If you want to do something more like you originally stated, try this:
    DECLARE
    selected_items HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
    s VARCHAR2(20);
    q varchar2(32767);
    BEGIN
    selected_items := HTMLDB_UTIL.STRING_TO_TABLE(:P50_SELECTED_INSTRUMENTS);
    -- htp.p('COUNT: '||selected_items.count);
    q:= 'SELECT '||
    'SUBSTR(orig_geo_loc_sys,1,INSTR(orig_geo_loc_sys,''-'')-1) AS INSTRUMENT, '||
    'SUBSTR(orig_geo_loc_sys,INSTR(orig_geo_loc_sys,''-'')+1, LENGTH'||
    ' (orig_geo_loc_sys)) AS ORIG_LINENUM, '||
    'sum(orig_intrl) orig_intrl, '||
    'sum(orig_extrl) orig_extrl, '||
    'sum(recv_intrl) recv_intrl, '||
    'sum(recv_extrl) recv_extrl '||
    'FROM line_usage_sum_view '||
    'WHERE 1=1 ';
    FOR i in 1..selected_items.count LOOP
    s := TO_CHAR(selected_items(i));
    q := q || ' and TO_CHAR(orig_geo_loc_sys) LIKE '''|| s ||'%'' ' ;
    END LOOP;
    q := q || ||'%'' '||
    --'WHERE TO_CHAR(orig_geo_loc_sys) LIKE ''2213003%'' '||
    'AND switch_id = ''' || :P1_SWITCH_ID || ''' ' ||
    'AND call_start_date > TO_DATE(''30-NOV-1999'') ' ||
    'AND call_clear_time > TO_DATE(''30-NOV-1999'') '||
    'AND '||
    :SORTFIELD||' BETWEEN '||
    'TO_DATE(:STARTDATE,''dd-MON-YYYY HH24:MI'') AND '||
    'TO_DATE(:STOPDATE, ''dd-MON-YYYY HH24:MI'') '||
    'GROUP BY GROUPING SETS (orig_geo_loc_sys)';
    -- htp.p('SQL query: '||q);
    RETURN q;
    END;
    Hope this helps...
    Anton

  • Dynamic select list with more than one value?

    I am creating a simple CRUD component for our company's Joomla site. This component allows our users to create discount bundles for our cart according to shopper group and products.  I've been using Dreamweaver to author the administrator forms and have run into a bit of a problem.  All of my forms work properly, but I need to be able to collect two values from each chosen multi-select listing. 
    Right now, when a user chooses an item under 'products', the site pushes back product_id, one of the variables I need.  I would also like product_parent_id to return with each result as well.  I need to be able to insert product_parent_id after the user has chosen their desired products.  product_parent_id is located in the same table as product_id.
    In the end, I need those two values to be pushed to another table, essentially creating a new entry for each product in the bundle.  Referenced by ID and parent ID.
    Pasted below is the administrator form code.  Any suggestions would be wonderful.
    Thanks!
    <?php require_once('Connections/SQLTest.php'); ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO jos_vm_related_products (product_id, related_product_id) VALUES (%s, %s)",
                           GetSQLValueString($_POST['products'], "int"),
                           GetSQLValueString($_POST['products'], "int"));
      mysql_select_db($database_SQLTest, $SQLTest);
      $Result1 = mysql_query($insertSQL, $SQLTest) or die(mysql_error());
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO jos_vm_relations (discount_type, discount, shopper_group_id) VALUES (%s, %s, %s)",
                           GetSQLValueString($_POST['amount_off_total'], "text"),
                           GetSQLValueString($_POST['dollar_amount'], "int"),
                           GetSQLValueString($_POST['shoper_group'], "int"));
      mysql_select_db($database_SQLTest, $SQLTest);
      $Result1 = mysql_query($insertSQL, $SQLTest) or die(mysql_error());
    if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form1")) {
      $insertSQL = sprintf("INSERT INTO jos_vm_relations_messages (discount_message) VALUES (%s)",
                           GetSQLValueString($_POST['discount_message'], "text"));
      mysql_select_db($database_SQLTest, $SQLTest);
      $Result1 = mysql_query($insertSQL, $SQLTest) or die(mysql_error());
    $maxRows_Products = 10;
    $pageNum_Products = 0;
    if (isset($_GET['pageNum_Products'])) {
      $pageNum_Products = $_GET['pageNum_Products'];
    $startRow_Products = $pageNum_Products * $maxRows_Products;
    mysql_select_db($database_SQLTest, $SQLTest);
    $query_Products = "SELECT * FROM jos_vm_product";
    $query_limit_Products = sprintf("%s LIMIT %d, %d", $query_Products, $startRow_Products, $maxRows_Products);
    $Products = mysql_query($query_limit_Products, $SQLTest) or die(mysql_error());
    $row_Products = mysql_fetch_assoc($Products);
    if (isset($_GET['totalRows_Products'])) {
      $totalRows_Products = $_GET['totalRows_Products'];
    } else {
      $all_Products = mysql_query($query_Products);
      $totalRows_Products = mysql_num_rows($all_Products);
    $totalPages_Products = ceil($totalRows_Products/$maxRows_Products)-1;
    mysql_select_db($database_SQLTest, $SQLTest);
    $query_shopper_group = "SELECT * FROM jos_vm_shopper_group";
    $shopper_group = mysql_query($query_shopper_group, $SQLTest) or die(mysql_error());
    $row_shopper_group = mysql_fetch_assoc($shopper_group);
    $totalRows_shopper_group = mysql_num_rows($shopper_group);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    </head>
    <body>
    <form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">
      <p>
        <label for="products"></label>
      Choose the product(s) you would like to add to your new discount bundle.</p>
      <p>
        <select name="products" size="1" multiple="MULTIPLE" id="products">
          <option value=""></option>
          <?php
    do { 
    ?>
          <option value="<?php echo $row_Products['product_id']?>"><?php echo $row_Products['product_name']?></option>
          <?php
    } while ($row_Products = mysql_fetch_assoc($Products));
      $rows = mysql_num_rows($Products);
      if($rows > 0) {
          mysql_data_seek($Products, 0);
      $row_Products = mysql_fetch_assoc($Products);
    ?>
        </select>
      </p>
    <p>
      <input type="hidden" name="hiddenField" id="hiddenField" />
      </p>
      <p>Choose the subscriber group that you would like this discount to apply to.</p>
      <p>
        <select name="shoper_group">
          <?php
    do { 
    ?>
          <option value="<?php echo $row_shopper_group['shopper_group_id']?>"><?php echo $row_shopper_group['shopper_group_name']?></option>
          <?php
    } while ($row_shopper_group = mysql_fetch_assoc($shopper_group));
      $rows = mysql_num_rows($shopper_group);
      if($rows > 0) {
          mysql_data_seek($shopper_group, 0);
      $row_shopper_group = mysql_fetch_assoc($shopper_group);
    ?>
        </select>
      </p>
      <p>Please enter the dollar amount that you would like to adjust.
        <label for="dollar_amount"><br />
        </label>
        <input type="text" name="dollar_amount" id="dollar_amount" />
      </p>
      <p>
        <input name="amount_off_total" type="hidden" id="amount_off_total" value="amount_off_total" />
      </p>
      <p>Enter any message you would like the shopper to view during shopping and checkout when this discount is applied.</p>
      <p>
        <label for="discount_message"></label>
        <textarea name="discount_message" id="discount_message" cols="45" rows="5"></textarea>
      </p>
      <p>
        <input type="hidden" name="MM_insert" value="form1" />
      </p>
      <p>
        <input type="submit" name="submit" id="submit" value="Submit" />
      </p>
    </form>
    <br />
    </body>
    </html>
    <?php
    mysql_free_result($Products);
    mysql_free_result($shopper_group);
    ?>

    Thanks guys for you reply , [Cor Ligthert] I post this in Visual basic section, I appreciate your solution [dbasnett],
    Thanks for that idea of attribute <Flags> [Blackwood] ,
    Dictionary will not work in IF Statement as I want it , also ParamArray tbl() , thanks guys.
    Here is the code
    Module myModule
    <Flags()>
    Enum Table As Integer
    Table1 = 2
    Table2 = 4
    Table3 = 8
    Table4 = 16
    Table5 = 32
    End Enum
    Public Sub MySub(ByVal Table As Table)
    If (Table And Table.Table1) = Table.Table1 Then
    MsgBox((Table And Table.Table1))
    End If
    If (Table And Table.Table2) = Table.Table2 Then
    MsgBox((Table And Table.Table2))
    End If
    If (Table And Table.Table3) = Table.Table3 Then
    MsgBox((Table And Table.Table3))
    End If
    If (Table And Table.Table4) = Table.Table4 Then
    MsgBox((Table And Table.Table4))
    End If
    If (Table And Table.Table5) = Table.Table5 Then
    MsgBox((Table And Table.Table5))
    End If
    End Sub
    End Module
    Class Myclass
    Private sub CallTables()
    MySub(Table.Table1 Or Table.Table2)
    MySub(Table.Table2 Or Table.Table3 Or Table.Table4)
    MySub(Table.Table1 Or Table.Table4 Or Table.Table5)
    MySub(Table.Table1 Or Table.Table2 Or Table.Table4 Or Table.Table5)
    MySub(Table.Table1 Or Table.Table2 Or Table.Table3 Or Table.Table4 Or Table.Table5)
    end sub
    end Class

  • Making Read Only A select List Item

    Hi,
    I am using Application Express 3.1.1.00.09 version.
    If the date field is future date then the Select List field should become Read only.
    I tried to make "read only".
    When I made it "read only" '>[] is displayed???
    Does some one have a solution?
    Thanks,
    Priyanka.

    Hi Leckraj,
    I assume that
    the select list is not displayed at all.means that your page item is not rendered as a select list input control, but it's rendered as text only, right? That's the nature of the read only condition, it will render almost all controls as text only.
    About the dynamic action solution. That can be simplified and doesn't require a hidden item or JavaScript.
    1) Create a dynamic action which fires for the "Page Load" event
    2) As (Server Side) Condition Type set "exists (SQL quer returns...)" and specify your SQL statement
    3) Use a "Disable" action to disable your select list page item
    The above dynamic action will only be included and executed on the page, if the SQL statement returns a value.
    Note: Please keep in mind that dynamic actions are browser based operations, for a skilled user it's no problem to enable the select list and modify the value. To secure it you should add a server side validation to verify if the user is really allowed to modify the value. That's the difference to the "Read Only Condition", because in that case the APEX engine guarantee that the value can't be modified.
    Regards
    Patrick
    Member of the APEX development team
    My Blog: http://www.inside-oracle-apex.com
    APEX Plug-Ins: http://apex.oracle.com/plugins
    Twitter: http://www.twitter.com/patrickwolf

  • I dont receive e-mails with attachment sent to OS X Server 3.0.1 Group-mailing lists

    I have a small company using a mac mini with mavericks and server 3.0.1.
    We are using most of the services available in OS X server (except DHCP, Netinstall and Xsan). One of the services we use the most is Mail server, and the whole company uses that as our primary mail server.
    We have set up several different Groups and activated group-mailing lists on some of them. The setup has been working very good for over a year (started using it with Mountain Lion Server).
    Recently I was going to send a christmas card to all employees using the workgroup mailing list. I was using the stationaries in Mail, and it was sent as normal but never recieved by me or any of the other employees. Below is the SMTP Log
    Dec  6 17:10:16 server.mydomain.com postfix/smtpd[29101]: connect from unknown[10.0.1.16 *<- my local IP address*]
    Dec  6 17:10:16 server.mydomain.com postfix/smtpd[29101]: 480451503B0A: client=unknown[10.0.1.16 *<- my local IP address*], sasl_method=CRAM-MD5, sasl_username=myusername
    Dec  6 17:10:16 server.mydomain.com postfix/cleanup[29109]: 480451503B0A: message-id=<[email protected]>
    Dec  6 17:10:16 server.mydomain.com postfix/qmgr[23288]: 480451503B0A: from=<[email protected]>, size=98063, nrcpt=1 (queue active)
    Dec  6 17:10:16 server.mydomain.com postfix/local[29110]: 480451503B0A: to=<[email protected]>, relay=local, delay=0.13, delays=0.05/0.01/0/0.08, dsn=2.0.0, status=sent (delivered to command: /Applications/Server.app/Contents/ServerRoot/usr/libexec/MailService/list_serve r_post post workgroup)
    Dec  6 17:10:16 server.mydomain.com postfix/qmgr[23288]: 480451503B0A: removed
    Dec  6 17:11:16 server.mydomain.com postfix/smtpd[29101]: disconnect from unknown[10.0.1.16 *<- my local IP address*]
    I did some trial and error and it seems like it is linked to the fact that I have attachments to the email. Sending an email with only text is recieved like normal. Even attacment like PDF or jpg is "blocked" it seems. I have tried using email outside my domain but still the same result. Sending the same email (with attachment) to all reciepients (not using the mailiing list) works and is recieved by everyone. I have turned off all email filtering settings on the server but still the same result.
    Is anyone else experiencing the same problem? My guess is that this is a Server 3.0.1 hickup, so it would be nice to get confirmation from others experiencing the same.

    Troubleshooting Apple Mail
    What does Mail/Window/Connection Doctor Show? If the server is red, select it and look at the Show Details box.
    Troubleshooting sending and receiving email messages
    Troubleshooting sending email messages

  • Impact of selecting "Removing Query from Selection List" in 2 channels.

    HI All ,
    I have customized a query in one channel (My Agreements and Contract Documents query in Master Agreements List channel) and have removed the standard query from the channel by checking the  "Remove Query from Selection List" and introduced my custom query in that query group .
    But  it resulted in break in chain for  "Master Agreements" link in "Contracts To Do List" channel as the link was pointing to standard  "My Agreements and Contract Documents" query and is displaying "The query can not be executed. Contact your system administrator" when ever I click on that.
    Any pointers on how to overcome above scenario wud be gr8!
    Regards,
    Uday

    Hi Uday,
    In order for To Do List channel to work, the query definition should be in the Master Agreement List query group. Do you still want the standard query in the To Do List? If so, you would have to leave it on the Query Group as To Do list is pointing to it. May be change the display name of the query so you can differentiate between the 2 queries. The other option is change the To Do channel to point to the custom query.
    Regards,
    Vikram

Maybe you are looking for

  • Open Transfer Orders in WM Cycle Count

    Hi experts: My client wants to implant cycle counting in WM, we are using MIBC for CC indicator analysis and LX26 to create inv. doc. The material master is ready with the CC indicators. But my client wants to know what open TO´s are already created

  • +Can't get photo/video on at all. :(

    +I've gotten this for two days now the new video ipod and i can get all the musik on there i just cant seem to be able to put any photos or vid into the itunes library u can "add file to library" it just doesnt do anything. this is very frusterating.

  • Make my powerbook run like new

    Lately my powerbook has had a lot of errors and is running slow. I was wondering how I make my ibook new again -? what do i do to like, re-make it ? thanks

  • Workflow from F-28 on save

    How can I start a workflow from transaction F-28 after save? I have checked change documents, and don't find anything. I have run the event trace and nothing there either. Lastly I can't find any obvious user-exits. Am I missing something, or is ther

  • AVCHD MP4 files settings

    I'm working with AVCHD files: MP4 extension. they are shot with a Sanyo 1010 camera. settings in the camera are 720p 30FPS. Now I need to create settings but I can only choose a couple of default choises... which one do I take? I want to edit in PAL