RadioGroup in a PL/SQL Region

How can I retrieve the selected radiobutton in a group after a submission?
I am creating and setting the active radiobutton with the following line of code:
htp.p(HTMLDB_ITEM.RADIOGROUP(p_idx => 3, p_value => value1, p_selected_value => value3));
The variable value1 contains a unique identifier for each radio button in the group, while value3 contains the unique identifier that is selected. This part works.
What doesn't work, is retrieving which radiobutton in the group is selected after it is submitted.

I would use regular region items if I could / knew how to. However, I have a form that has a static and a dynamic part. The static part of the form is created by regular region items.
The dynamic part consists of N rows (similar to a shopping cart) that are added by opening a popupwindow. In the popup window there is a tree, and I can select exactly one item from the tree. This makes the opener page submit and add one row to insert the previously selected item. I intend to use a select group to select exactly one of the rows to be the "main" row.

Similar Messages

  • Report Using PL/SQL Region

    Hi,
    I have bit experiment create custom reports using PL/SQL region
    http://dbswh.webhop.net/apex/f?p=BLOG:READ:0::::ARTICLE:97800346956448
    I would like have from you tips and ideas how enhance this.
    Because I'm not so good with SQL,
    I really appreciate if you have tips enhance performance for query used for cursor.
        /* Report query */
        l_sql := '
          SELECT * FROM(
            SELECT a.*, row_number() OVER (ORDER BY '
            || l_sort_col
            || ' '
            || l_sort_ord
            || ') rn, COUNT(1) over() mrn
            FROM(' || l_sql || ') a
          ) WHERE rn BETWEEN ' || l_start_row || ' AND ' || l_last_row
        ; Regards,
    Jari

    Hi Jari
    I'm guessing you're trying to do paginated grid data or somewthing similar? You could try something like this...
        l_sql := 'SELECT * '||
               'FROM ('||
                      'SELECT /*+ FIRST_ROWS(n) */ '||
                              'a.*, ROWNUM rnum '||
                       'FROM ('||l_sql||' '||
                              'ORDER BY '||l_sort||' '||l_dir||') a '||
                       'WHERE ROWNUM <= '||l_max_row||') '||
               'WHERE rnum >= '||l_start;The variables would be initialized in the procedure as follows...
        l_max_row := p_start + p_limit;
        l_start   := p_start + 1;
        l_sort    := NVL(p_sort,'1');
        l_dir     := NVL(p_dir, 'ASC');My application process would be called something like follows, to spit out a JSON object...
    BEGIN
      htp.p(wwv_flow.g_widget_num_return||'(');
      munky_extjs.grid_json(p_app_id => wwv_flow.g_x01,
                        p_app_page_id => wwv_flow.g_x02,
                        p_region_id => TO_NUMBER(wwv_flow.g_x03),
                        p_start => NVL(wwv_flow.g_x04,0),
                        p_limit => NVL(wwv_flow.g_x05,10),
                        p_sort => wwv_flow.g_x06,
                        p_dir => wwv_flow.g_x07);
      htp.p(')');
    END;I think your use of analytics in the inner query may be slowing you down if you have a lot of data?
    Cheers
    Ben

  • Connecting a report region and a PL/SQL region

    Hi,
    I have created a report region whith pagination that only show 1 row at a time. I can then navigate backwards and forwards through this recordset. The first reportcolum in this recordset contains a number.
    I have also, on the same page, created a PL/SQL procedure region. What I want is to use the number from the SQL region as an input to the PL/SQL region. So when I navigate through the report (Using the pagination arrows), the PL/SQL region is in sync with the record I'm currently seeing in the report.
    Is this possible or do I have to try something different?
    Regards
    Trond

    Hi Trond,
    If you only want to show one record in your first region, it might be best to work with page items, retrieve one record at a time and use that data as the source for your page items. It's easier to implement and easier to reference those values in your second region. Reports are great if you have more then one record.
    Having said that, there are ways to implement it the way you outlined it in your posting. Granted it's not very elegant but it serves its purpose. You could write your own PL/SQL package, use this to set a global to the current row's primary key value and reference that global in your second region.
    Create your package as follows:
    create or replace package md_sample as
    g_pk_value number;
    function set_value(p_value number) return number;
    end;
    create or replace package body md_sample as
    function set_value(p_value in number) return number is
    begin
    g_pk_value := p_value;
    return 1;
    end;
    end;
    Now you need to make sure that your report calls this package appropriately. Calling this as part of your SQL statement won't work properly as it would also be called for records not currently shown on your page. A better way would be to use it for a PL/SQL expression within your report template definition. Pick a custom report template for your report and edit that template. Scroll down to the condition for the first column template and pick “Use Based on PL/SQL Expression”. Then type in the following expression (this is based on a select deptno, dname, loc from dept report):
    md_sample.set_value(#DEPTNO#)=1
    After that you'll be able to reference the global md_sample.g_pk_value. You could e.g. use this as the source for page items shown in your second region.
    Hope this helps,
    Marc

  • Have an ajax memory tree in a pl/sql region be rendered only once in a page

    Hi all,
    I have a pl/sql region with region source calling a function "ajax_memory_tree.render". Everytime I come back to this particular page, I am having a tree being rendered. Can you give any suggestion as to how I can have only one tree. Thank you for your help/ideas.
    regards,
    Suma.

    procedure render_branch
      (p_type in varchar2, p_icon in varchar2, p_class in varchar2, p_id in number, p_pid in number, p_name in varchar2)
    is
    x varchar2(1000);
    y varchar2(2000);
    begin
    -- If the branch has sub nodes, render it with a +/- sign
    if p_type = 'exp' then
        htp.prn('&lt;li style="vertical-align:right;">&lt;img style="cursor:pointer;margin-right:15px;"
             src="/i/' || p_icon || '.gif" onClick="getTreeNode(this,''' || p_id || ''')" />
       &lt;a class="' || p_class || '" href="f?p=' ||
       v('APP_ID') || ':1:' || v('APP_SESSION') || '::::P1_SELECTED_NODE:' || p_id || '">' || p_name ||
       '&lt;/a>&lt;/span>&lt;/li>');
    -- Otherwise, just render the item
    else
    if p_id = 5000 then
        select opt_path into x from e_navopts where opt_num = p_id and popt_num = p_pid
        and userid = v('APP_USER');
            htp.prn('&lt;li style="vertical-align:right;margin-left:15px;">&lt;img src="/i/wwv_bullet.gif" style="padding-right:8px;"/>&lt;a
      class="' || p_class || '" href="'||x || v('APP_SESSION')|| '::::'||
      '">' || p_name ||'&lt;/a>&lt;/span>&lt;/li>');
    elsif  p_id = 3000 then
        select opt_path into x from e_navopts where opt_num = p_id and popt_num = p_pid
        and userid = v('APP_USER');
        select opt_params into y from e_navopts where opt_num = p_id and popt_num = p_pid
        and userid = v('APP_USER');
           htp.prn('&lt;li style="vertical-align:right;margin-left:15px;">&lt;img src="/i/wwv_bullet.gif" style="padding-right:8px;"/>&lt;a
      class="' || p_class || '" href="'||x || v('APP_SESSION')|| '::::'||
      '">' || p_name ||'&lt;/a>&lt;/span>&lt;/li>');
    else
      htp.prn('&lt;li style="vertical-align:right;margin-left:15px;">&lt;img src="/i/wwv_bullet.gif" style="padding-right:8px;"/>&lt;a
      class="' || p_class || '" href="f?p=' || v('APP_ID') || ':1:' || v('APP_SESSION') ||
      '::::P1_SELECTED_NODE:' || p_id || '">' || p_name || '&lt;/a>&lt;/span>&lt;/li>');
        end if;
    end if;
    end render_branch;

  • Sorry-duplicate thread,since problem in forumby5.45pm pl/sql region in apex

    Hi All,
    From sqlworkshop,
    I have created a view like
    CREATE OR REPLACE FORCE VIEW VW_SUB_CL_ADD1 AS
    (select a.siteid siteid,a.bpaadd_0 bpaadd_0,a.bpanum_0 bpanum_0,
    case when a.bpaaddlig_0 = '' then '-' else a.bpaaddlig_0 end address1,
    case when a.bpaaddlig_1 = '' then '-' else a.bpaaddlig_1 end address2,
    case when a.bpaaddlig_2 = '' then '-' else a.bpaaddlig_2 end address3,
    case when a.bpades_0 = '' then '-' else a.bpades_0 end place,
    case when a.cty_0 = '' then '-' else a.cty_0 end city,
    case when a.poscod_0 = '' then '-' else a.poscod_0 end pincode,
    case when b.cntnam_0 = '' then '-' else b.cntnam_0 end contactname,
    case when b.fax_0 = '' then '-' else b.fax_0 end fax,
    case when b.MOBTEL_0 = '' then '-' else b.MOBTEL_0 end mobile,
    case when b.TEL_0 = '' then '-' else b.TEL_0 end phone,
    case when b.web_0 = '' then '-' else b.web_0 end website,
    c.zinvcty_0 zcity,c.bpainv_0 bpainv_0,c.bpcnum_0 bpcnum_0
    from lbcreport.bpaddress@info a,lbcreport.contact@info b ,lbcreport.bpcustomer@info c
    where (a.bpanum_0=b.bpanum_0) and (a.cty_0 = c.zinvcty_0) and (a.siteid = c.siteid))
    but when i execute select * from vw_sub_cl_add1
    the case is not working. '-' is not getting displayed for null values even i tried nvl function it is not working
    when i use this view in apex for pl/sql region to display in the form of table .
    The problem is, when there is no value in the columns the table is not showing row and column in a proper manner.
    could any one help to overcome it.
    Thanks in advance
    bye
    Srikavi
    Edited by: srikavi on Sep 10, 2008 10:42 AM

    Srikavi,
    1. The problem with null values is a template problem. Using Firefox and Web Developer Toolbar extension / CSS / View Style Information, you can find out which css class your report is referencing. Open the corresponding css file and add the following to the css class:
    empty-cells:show;border-collapse:collapse;
    It will show the borders for null values after that.
    2. b.fax_0 = '' is not correct. It should be b.fax_0 IS NULL.
    3. You can also try to use the built in property for showing NULL values as in the report attributes.
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    -------------------------------------------------------------------

  • PL/SQL Region : Getting values from PL/SQL generated form?  (APEX 2.2.0)

    Hi, all,
    If I've got an PL/SQL region that dynamically generates a form using HTMLDB_ITEM.TEXTAREA, what is the best way to get the contents of those form data at submit time?
    Thanks,
    Don
    Message was edited by:
    Don_84
    Edited for clarity.

    Don,
    The apex_item (nee htmldb_item) functions take an index number as a parameter. So if you give the textarea function p_idx=>1, it creates item f01. If you give it p_idx=>2, it creates item f02, etc. In your after-submit code, access the package variable apex_application.g_fxx where xx is the index number you used.
    Scott

  • Pl/sql region in apex

    Hi All,
    From sqlworkshop,
    I have created a view like
    CREATE OR REPLACE FORCE VIEW VW_SUB_CL_ADD1 AS
    (select a.siteid siteid,a.bpaadd_0 bpaadd_0,a.bpanum_0 bpanum_0,
    case when a.bpaaddlig_0 = '' then '-' else a.bpaaddlig_0 end address1,
    case when a.bpaaddlig_1 = '' then '-' else a.bpaaddlig_1 end address2,
    case when a.bpaaddlig_2 = '' then '-' else a.bpaaddlig_2 end address3,
    case when a.bpades_0 = '' then '-' else a.bpades_0 end place,
    case when a.cty_0 = '' then '-' else a.cty_0 end city,
    case when a.poscod_0 = '' then '-' else a.poscod_0 end pincode,
    case when b.cntnam_0 = '' then '-' else b.cntnam_0 end contactname,
    case when b.fax_0 = '' then '-' else b.fax_0 end fax,
    case when b.MOBTEL_0 = '' then '-' else b.MOBTEL_0 end mobile,
    case when b.TEL_0 = '' then '-' else b.TEL_0 end phone,
    case when b.web_0 = '' then '-' else b.web_0 end website,
    c.zinvcty_0 zcity,c.bpainv_0 bpainv_0,c.bpcnum_0 bpcnum_0
    from lbcreport.bpaddress@info a,lbcreport.contact@info b ,lbcreport.bpcustomer@info c
    where (a.bpanum_0=b.bpanum_0) and (a.cty_0 = c.zinvcty_0) and (a.siteid = c.siteid))
    but when i execute select * from vw_sub_cl_add1
    the case is not working. '-' is not getting displayed for null values even i tried nvl function it is not working
    when i use this view in apex for pl/sql region to display in the form of table .
    The problem is, when there is no value in the columns the table is not showing row and column in a proper manner.
    could any one help to overcome it.
    Thanks in advance
    bye
    Srikavi

    Hi Srikavi,
    From your statement, it looks as though you are retrieving data from an external datasource? I have had a similar problem - it's due to the ODBC driver not recognizing nulls properly. In the end, I had to do something like:
    case when xxx is null then '-' when xxx = ' ' then '-' when xxx = '' then '-' else xxx end xxxxx,
    ...This particularly happens with MS SQL databases and especially when their tables use char instead of varchar fields. The MSSQL table treats "empty" char fields as nulls but the ODBC driver doesn't - so the IS NULL value won't work on Oracle's side and the '' comparison won't always work on MS SQL side; hence having to check for all possibilities. The above may be overkill, but it did the job!
    Andy

  • How to process a form created in a pl/sql region

    Hi:
    I have a form that is generated using pl/sql and this form is displayed on a page in a 'pl/sql' region. The form displays a 'Submit' button which upon being clicked should return the user to the same page but with the contents of the form updated etc etc. What should I set the form's 'Action' attribute to for this to happen ? Is it possible for 'post-submit' processes to be specified for such a form ?
    Thanks !

    Vikas:
    The form is the product of converting a VB based application to pl/sql. The VB app. is a sort of a dynamic form generator. The form elements (what elements a form is made up of) are stored in a database. For the purpose of illustration we can assume that the application is a survey application and the VB code generates the required survey form depending on the user requesting the form, the survey being requested etc. The questions/answers and the HTML element that will be used to render the question/answer are stored in the database as mentioned previously.
    I adopted what I thought was the easiest method to convert this application into an APEX app. This method ofcourse being converting the VB to PL/SQL and then using the pl/sql Web Tool kit to generate a PL/SQL region on an APEX page.
    Now, based on your comments it appears to me that I may have started off on the wrong track !

  • Sql  functions in Pl/Sql region not working

    Hi all,
    I have created a pl/sql region like this
    This is the example taken from denes kubicek
    DECLARE
       v_counter     INTEGER         := 0;
       v_line        VARCHAR2 (4000);
       v_rec_in_row  INTEGER         := 6;
    BEGIN
       HTP.prn ('<table>');
       HTP.prn ('<tr>');
       HTP.prn ('<td>');
       FOR c IN
          (SELECT CASE
                     WHEN LOWER(SUBSTR(SUBSTR(NAME,INSTR(NAME,'/')+1), -3, 3)) = 'doc'
                        THEN    '<table>'
                             || '<tr><td><img src="#WORKSPACE_IMAGES#user_green_locked.gif"/></td></tr>'
                             || '<tr><td style="text-align:center">'
                             || SUBSTR(NAME,INSTR(NAME,'/')+1)  name
                             || '</td></tr></table>'
                     WHEN LOWER(SUBSTR(SUBSTR(NAME,INSTR(NAME,'/')+1), -3, 3)) = 'xls'
                        THEN    '<table>'
                             || '<tr><td><img src="#WORKSPACE_IMAGES#user_yellow.gif"/></td></tr>'
                             || '<tr><td style="text-align:center">'
                             || SUBSTR(NAME,INSTR(NAME,'/')+1) name
                             || '</td></tr></table>'
                    WHEN LOWER(SUBSTR(SUBSTR(NAME,INSTR(NAME,'/')+1), -3, 3)) = 'ppt'
                        THEN    '<table>'
                             || '<tr><td><img src="#WORKSPACE_IMAGES#user_yellow.gif"/></td></tr>'
                             || '<tr><td style="text-align:center">'
                             || SUBSTR(NAME,INSTR(NAME,'/')+1) name
                             || '</td></tr></table>'
                   WHEN LOWER(SUBSTR(SUBSTR(NAME,INSTR(NAME,'/')+1), -3, 3)) = 'txt'
                        THEN    '<table>'
                             || '<tr><td><img src="#WORKSPACE_IMAGES#user_yellow.gif"/></td></tr>'
                             || '<tr><td style="text-align:center">'
                             || SUBSTR(NAME,INSTR(NAME,'/')+1) name
                             || '</td></tr></table>'
                   WHEN LOWER(SUBSTR(SUBSTR(NAME,INSTR(NAME,'/')+1), -3, 3)) = 'gif'
                        THEN    '<table>'
                             || '<tr><td><img src="#WORKSPACE_IMAGES#user_yellow.gif"/></td></tr>'
                             || '<tr><td style="text-align:center">'
                             || SUBSTR(NAME,INSTR(NAME,'/')+1) name
                             || '</td></tr></table>'
                     ELSE    '<table>'
                          || '<tr><td><img src="#WORKSPACE_IMAGES#user_red.gif"/></td></tr>'
                          || '<tr><td style="text-align:center">'
                          || SUBSTR(NAME,INSTR(NAME,'/')+1) name
                          || '</td></tr></table>'
                  END doc
             FROM con_doc_info)
       LOOP
          v_line := v_line || c.doc || '</td><td>';
          v_counter := v_counter + 1;
          IF v_counter = v_rec_in_row
          THEN
             HTP.prn (v_line);
             HTP.prn ('</td></tr><tr><td>');
             v_line := NULL;
             v_counter := 0;
          END IF;
       END LOOP;
       HTP.prn (v_line);
       HTP.prn ('</td></tr></table>');
    END;but the functions are not working?
    Any idea ? Please help me

    Hi fac
    Database version is 10g
    This sample code is working
    DECLARE
       v_counter     INTEGER         := 0;
       v_line        VARCHAR2 (4000);
       v_rec_in_row  INTEGER         := 6;
    BEGIN
       HTP.prn ('<table>');
       HTP.prn ('<tr>');
       HTP.prn ('<td>');
       FOR c IN
          (SELECT CASE
                     WHEN deptno = 20
                        THEN    '<table>'
                             || '<tr><td><img src="#WORKSPACE_IMAGES#user_green_locked.gif"/></td></tr>'
                             || '<tr><td style="text-align:center">'
                             || ename
                             || '</td></tr></table>'
                     WHEN deptno = 30
                        THEN    '<table>'
                             || '<tr><td><img src="#WORKSPACE_IMAGES#user_yellow.gif"/></td></tr>'
                             || '<tr><td style="text-align:center">'
                             || ename
                             || '</td></tr></table>'
                     ELSE    '<table>'
                          || '<tr><td><img src="#WORKSPACE_IMAGES#user_red.gif"/></td></tr>'
                          || '<tr><td style="text-align:center">'
                          || ename
                          || '</td></tr></table>'
                  END emp
             FROM emp)
       LOOP
          v_line := v_line || c.emp || '</td><td>';
          v_counter := v_counter + 1;
          IF v_counter = v_rec_in_row
          THEN
             HTP.prn (v_line);
             HTP.prn ('</td></tr><tr><td>');
             v_line := NULL;
             v_counter := 0;
          END IF;
       END LOOP;
       HTP.prn (v_line);
       HTP.prn ('</td></tr></table>');
    END;This code is working good images are displayed as per the deptno.
    I need to display images for the documents which i have uploaded and stored in a file
    I am taking the name and in that last three letters alone and according to that pictures should appear
    My previous code while running no output is there.
    Hope I am more clear now
    bye
    Srikavi

  • Pagination with pl/sql region.

    Hi all,
    I have created one more sample page with pl/sql region
    workspace: srijaks
    login:[email protected]
    password:srijakutty
    Application: 49471 - Sample Field Display
    page 16
    Initially it will display the first two records of the concerned department.
    but then by clicking the next and previous buttons it has to display the next two records and the previous 2 records respectively.
    Please, if some one can help me !!!?
    Thanks in advance
    bye
    Srikavi

    Hi Srikavi,
    OK - I've updated your page to get the next/previous buttons working. I have removed the bit in the PL/SQL code that assigned a value to the next button as this was causing me problems. I have also updated the select statement in this to include: and empno >= v('P16_EMPNO').
    The next/previous buttons are based on:
    Previous:
    WITH EMPS AS (SELECT EMPNO, DENSE_RANK () OVER (ORDER BY EMPNO DESC) EMPNUMBER FROM EMP WHERE DEPTNO = :P16_SELECT_DEPT AND EMPNO &lt; :P16_EMPNO ORDER BY EMPNO DESC)
    SELECT NVL(MAX(EMPNO),0)
    FROM EMPS
    WHERE EMPNUMBER = 2Next:
    WITH EMPS AS (SELECT EMPNO, DENSE_RANK () OVER (ORDER BY EMPNO) EMPNUMBER FROM EMP WHERE DEPTNO = :P16_SELECT_DEPT AND EMPNO &gt; :P16_EMPNO ORDER BY EMPNO)
    SELECT NVL(MIN(EMPNO),0)
    FROM EMPS
    WHERE EMPNUMBER = 2These are calculated Before Header and are unconditional
    I have also added an Employees item that is set as:
    {code
    SELECT COUNT(*)
    FROM EMP
    WHERE DEPTNO = :P16_SELECT_DEPT
    This is only calculated when the item is null - which will be the case when a new dept is selected - so this only happens once per selection.  This returns a correct record count - updating the select statement in the report as above, caused problems with the existing count.  Not sure if you want to change these back?
    As you can see, I've assigned a ranking to each item - this could have been achieved using a row number as well.  There are several ways this could have been handled.  The next/previous buttons could be based on the ranking/rownumber value and the EMPNO retrieved based on this.  The EMPNOs could be queried into a collection and you could use the sequence numbers to move through the records.  The above is just one example - you might like to try the others to see which one you prefer.
    Andy                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Htp.p not rendering correctly in Apex PL/SQL region

    I'm using Apex 3.0.1 and have an application that merges data with an email template. I have a mailing list review function that allows you to preview any of the emails. This works by calling a packaged merge function in a PL/SQL region as in:
    htp.p (package.merge_function (p1 => 1, p2 => 2, p3 => 3));
    The "merge_function" returns a CLOB which contains the complete HTML message.
    The problem is this: when the email is sent and received it looks fine, but when previewed as above the font size changes in the HTML are not recognised. The other attributes, e.g. colour and font face are OK. I am more experienced with PL/SQL than with HTML so any help would be appreciated.

    Rick,
    The CSS files that APEX uses set some default font settings for all regions. Unless overridden, these default settings will be applied to most everything on the page.
    If you're going to use an htp.p() to put some text on the page, you may want to consider wrapping the entire output of htp.p with a DIV tag.
    For instance:
    htp.p('&lt;div style="font-size:12px;"&gt;' || your_contents || '&lt;/div&gt;');Hope that helps!
    - Scott -

  • Calling an On Demand Process in PL/SQL Region without using AJAX

    Hi!
    I am trying to find a way to call an On demand Process in a PL/SQL Reports Region. The reason is that i need Reportings for about 20 Pages that look like the same but have different parameters. I already have some Processes that return SQL Statements and it works fine. But these Reportings are more complex and it's not possible to return it wirh a SQL Statement.
    I have seen some solutions in this forum that used AJAX to call such a process. The problem is, that I'm not allowed to use AJAX because activeX is diabled. I tried it and it works but i need another way to solve this process call.
    Thanks in advance
    Philipp

    At the moment I cannot say if your link can help. Right now the call of the On demand Process looks like this:
    Inside annonymous PL/SQL Region:
    <script type="text/javascript">
    get = new htmldb_Get(null,'||:APP_ID||'.,'APPLICATION_PROCESS=F_REPORT_NAME',0);
    gReturn = get.get();
    document.write(gReturn);
    </script>

  • Using APEX_ITEM in pl/sql region

     

    this is the apex pl/sql region code and the page process, when the page is submitted the process fires but doe snot recognize any of the apex application global arrays???
    {DECLARE
    CURSOR get_bank IS
    select C.form, C.form_description, C.form_details
    from form C
    where C.form_type = 'P' and
    NOT EXISTS
    (select ''
    from sis_user_portlet D
    where D.fk_sis_user_roles = :P0_LOGIN_ROLE and
    D.portlet_id = C.form)
    order by 2;
    BEGIN
    htp.tableOpen(cattributes=>'width="100%" border="0" cellspacing="0" cellpadding="2"');
    htp.tableRowOpen;
    htp.p('<td align="center" width="100%">');
    htp.p('<div class="WidgetBank">');
    FOR x in get_bank LOOP
    htp.p('<td nowrap>');
    htp.p('<div id="' || x.form || '" class="bank" ondblclick="moveToDashboard(this.id,this.className);" onmouseup="setPosition(this.id,this.className);">');
    htp.p(x.form_description);
    htp.p('<span id="'||x.form||'_span" style="display:none;">');
    htp.tableOpen;
    htp.tableRowOpen;
    htp.p('<td>');
    htp.p(APEX_ITEM.HIDDEN(P_IDX =>1,
    p_value =>'test',
    p_attributes =>'id="'||x.form||'_form"'));
    htp.p(APEX_ITEM.HIDDEN(P_IDX =>2,
    p_value =>'',
    p_attributes =>'id="'||x.form||'_x"'));
    htp.p(APEX_ITEM.HIDDEN(P_IDX =>3,
    p_value =>'',
    p_attributes =>'id="'||x.form||'_y"'));
    htp.p('Height:');
    htp.p(APEX_ITEM.TEXT(P_IDX =>4,
    p_value =>'',
    p_size =>5,
    p_maxlength =>4,
    p_attributes =>'id="'||x.form||'_height"
    onChange="setHeight(this.value,'||''''||x.form||''''||');"'));
    htp.p('</td>');
    htp.tableRowClose;
    htp.tableRowOpen;
    htp.p('<td>');
    htp.p('Width:');
    htp.p(APEX_ITEM.TEXT(P_IDX =>5,
    p_value =>'',
    p_size =>5,
    p_maxlength =>4,
    p_attributes =>'id="'||x.form||'_width"
    onChange="setWidth(this.value,'||''''||x.form||''''||');"'));
    htp.p('</td>');
    htp.tableRowClose;
    htp.tableClose;
    htp.p('</span>');
    htp.p('</div>');
    htp.p('</td>');
    END LOOP;
    htp.p('</div>');
    htp.p('</td>');
    htp.tableRowClose;
    htp.tableClose;
    END;
    DECLARE
    l_portlet_id sis_user_portlet.portlet_name%TYPE;
    l_x_position sis_user_portlet.x_position%TYPE;
    l_y_position sis_user_portlet.y_position%TYPE;
    l_width sis_user_portlet.width%TYPE;
    l_height sis_user_portlet.height%TYPE;
    get_pk sis_user_portlet.pk_id%TYPE;
    BEGIN
    FOR i in 1 .. wwv_flow.g_f01.COUNT LOOP
    --if apex_application.g_f01(i) is not null then null;
    get_pk := sis_express.get_sys_guid();
    l_portlet_id := wwv_flow.g_f01(i);
    l_x_position := wwv_flow.g_f02(i);
    l_y_position := wwv_flow.g_f03(i);
    l_height := wwv_flow.g_f04(i);
    l_width := wwv_flow.g_f05(i);
    insert into sis_user_portlet (pk_id, fk_sis_user_roles, portlet_id,
    x_position, y_position, width, height)
    values (get_pk, :P0_LOGIN_ROLE, l_portlet_id,
    l_x_position, l_y_position, l_width, l_height);
    --end if;
    END LOOP;
    commit;
    END;}
    Edited by: [email protected] on Nov 11, 2009 3:22 PM
    Edited by: [email protected] on Nov 11, 2009 3:23 PM

  • Upload File using decode in SQL Region...Help

    I am trying to allow a user to see the file names of files attached to a row (ex., training certificates for training taken). If there is no training certificate attached, "None (Upload Certificate)" is shown in that column as html. I want the user to be able to upload the certificate, by clicking on that html. I'm getting "Error ERR-1002 Unable to find item ID for item "TRAINING_ID" in application "113". ", when clicking on the link.
    Here is my code:
    select
    A.TRAINING_ID,
    A.TRAINING_ID TRAINING_ID_DISPLAY,
    A.PERSONNEL_ID,
    A.COURSE_ID,
    A.DATE_COMPLETED,
    A.CERTIFICATE_ID,
    B.IMAGE_ID,
    decode(b.filename, null, htf.anchor('f?p=113:1090:'||:APP_SESSION||'::NO::PERSONNEL_ID,TRAINING_ID:'||A.PERSONNEL_ID||'%2C'||A.TRAINING_ID, 'None (Upload Certificate)'),
    ''||&B.FILENAME||'') as cert_file_name,
    B.IMAGE_ID DELETE_CERTIFICATE
    from TRAINING A, EASY_IMAGE B
    WHERE A.PERSONNEL_ID = :P2_PERSONNEL_ID
    AND (A.PERSONNEL_ID = B.PERSONNEL_ID (+)
    AND A.TRAINING_ID = B.TRAINING_ID (+))
    The only thing that doesn't seem to be working correctly, is when the filename is null, the parameter's being passed and calling of the upload form. I've tested this in another app, but not being passed in the SQL Region and in both cases the status line at the bottom match for the call, when passing the mouse over the link. One works fine , but the decoded one gives me the error above.
    Any Help/Direction would be GREATLY Appreciated.
    Thanks in Advance!
    Juanita Layne

    We Got it......
    We changed the decode to this..
    decode(b.filename, null, htf.anchor('https://rockhopper.hqcnsg.navy.mil/apex/f?p=102:1090:&SESSION.::NO::PERSONNEL_ID,TRAINING_ID:'||A.PERSONNEL_ID||','||A.TRAINING_ID||':','None (Upload Certificate)'), ''||&B.FILENAME||'') as cert_file_name,
    and our 2 items
    PERSONNEL_ID and TRAINING_ID were setup as Database Items. We changed them to Static Assignments and passed #PERSONNEL_ID# and #TRAINING_ID# to those items respectively. It worked perfectly after that.
    Maybe that will help someone else.
    Thanks,
    Juanita

  • Render Dynamic PL/SQL region as PDF?

    Hi!
    I would like to be able to render a Dynamic PL/SQL region as a PDF. Anybody have an idea how to do this or even if it can be done? This is not a report region.
    Also any idea's on how I might do pagination in a dynamic PL/SQL region?
    Any hope that a future version of APEX will accept lines from a PL/SQL function (including anonymous ones) as the source of a report region? It would need to preserve blank lines. Currently only select statements are valid for generating APEX reports.
    Thanks in advance for your help!
    Dave Venus

    Scott,
    This is what is what debug mode puts out just before it issues the data not found error:
    0.07: ...Process "create collection": PLSQL (ON_SUBMIT_BEFORE_COMPUTATION) -- -- Create Collections -- -- declare la_cks apex_application_global.vc_arr2; begin if apex_application.g_f19.count > 0 then -- wwv_flow.debug('count gt 0 for checksum'); la_cks := apex_application.g_f19; else
    0.09: Encountered unhandled exception in process type PLSQL
    0.09: Show ERROR page...
    0.09: Performing rollback...
    I was hoping that the wwv_flow.debug statements would help me figure out where the error was occurring, but they did not produce anything so I commented them out. One thing that might be useful is that when I am not in debug mode and I click the OK link after the Oracle error message, the repainted screen still has the checkboxes that have been marked so I am guessing the error handler can see the data that I put into the .g_fnn arrays within my pl/sql region code.
    In other tabular forms within the same application, the create collection code starts the same way and I do not have any problems.
    One of the tests I did this morning was to replace my reference to the fcs array with f19 just in case there was something special being done for checksums, but the change had no effect.
    thanks,
    Peter

Maybe you are looking for

  • BO XI 3.1 DeskI report Calculation mismatch in record values

    Hi , I have an Calculation issue in one report after migrated from BO 5.1.6 to BO XI 3.1. After refreshing two reports parallelly, BO XI 3.1 report 1st 3 records of two columns are not at all there in BO 5.1.6 report. in XI 3.1 i am getting 3 more re

  • Can multiple users share 1 address book w/out MobileMe?

    To date we've used MobileMe, so synchronizing our address book amongst two user accounts (1 MacBook) was easy. However, that's the ONLY service of MobileMe I use anymore. It's just WAY too expensive for what it provides, especially compared to free s

  • IPod can't sync music from my iTunes library

    I bought a new iPod Touch and cannot sync the music from my itunes library. There are a lot of error messages that come up as I am attempting to sync the music. I have talked by phone to Apple people, returned the iPod and got a new one, re-installed

  • Hi ... I dont have facetime on my iphone , wat can i do

    I dont have facetime on my home screen .. Can someone help with that

  • Confused a bit

    Hello, I'm taking a PhoneGap Mobile Apps class this semester in college. I'm using Win7, with CS6. We are the ginny-pig class. First time being taught at school. Please explain.We are using Dreamweaver as our IDE? Now I need to download the PhoneGap