Apex Manual tabular form

Hi friends,
I am new to Apex and am making a timesheet application. I have 2 main tables which I am using and their structures are as follows:
TB_OPMI_PROJ_ACT_MAP:
PROJ_REF VARCHAR2
REL_ID VARCHAR2
ACT_CODE VARCHAR2
TB_OPTI_EMP_TS:
PROJ_REF VARCHAR2
REL_ID VARCHAR2
EMP_ID VARCHAR2
ACT_CODE VARCHAR2
TS_WDI NUMBER
TS_WD2 NUMBER
TS_WD3 NUMBER
TS_WD4 NUMBER
TS_WD5 NUMBER
TS_WD6 NUMBER
TS_WD7 NUMBER
TS_REMARKS VARCHAR2
TS_STATUS VARCHAR2
Now I have to create a manual tabular form based on data from these 2 tables and either insert or update data into the timesheet table.
The page structure is such that I have created page items for emp_id, proj_ref and rel_id(all are LOV’s). And there is a button that submits the page. So when the user inputs the data and clicks on submit, the report whose source code is as follows shows up with data from both tables:
DECLARE
v_query varchar2(10000);
BEGIN
IF :P7_RELEASE_ID is not null THEN
v_query := 'SELECT b.act_code activities,
apex_item.text (1, a.ts_wd1, 10, 10) monday,
apex_item.text (2, a.ts_wd2, 10, 10) tuesday,
apex_item.text (3, a.ts_wd3, 10, 10) wednesday,
apex_item.text (4, a.ts_wd4, 10, 10) thursday,
apex_item.text (5, a.ts_wd5, 10, 10) friday,
apex_item.text (6, a.ts_wd6, 10, 10) saturday,
apex_item.text (7, a.ts_wd7, 10, 10) sunday,
apex_item.text (8, a.ts_remarks, 70, 128) remarks
from tb_opti_emp_ts a, tb_opmi_proj_act_map b
WHERE a.proj_ref = b.proj_ref
AND a.rel_id = b.rel_id
AND a.act_code = b.act_code
AND a.emp_id = '''||:P7_EMPLOYEE||'''
AND b.rel_id = '''||:P7_RELEASE_ID||'''
AND a.proj_ref = '''||:P7_PROJ_REF||''';';
ELSE
v_query := 'SELECT 1 FROM dual WHERE 1=0';
END IF;
return(v_query);
END;
Now this query is working fine. The data in the tb_opmi_proj_act_map is basically the activities mapped on each project reference and release id.
Now when there is no corresponding data for the emp_id,proj_ref,rel_id and act_code in the main timesheet table, even then I need to generate to a tabular form structure with all the activities listed for the input proj_ref and rel_id and the 8 respective columns for the days of the week and remarks for each row or activity. I don’t know how to progress and am stuck. I just had a thought of modifying my region source a bit something like this.
DECLARE
v_query varchar2(10000);
v_count number;
BEGIN
+Select count(*) into v_count from tb_opti_emp_ts where emp_id=P7_EMPLOYEE and proj_ref=P7 PROJREF and rel_id=P7_REL_ID;+
IF (:P7_RELEASE_ID is not null) and (v_count>0)  THEN
v_query := 'SELECT b.act_code activities,
apex_item.text (1, a.ts_wd1, 10, 10) monday,
apex_item.text (2, a.ts_wd2, 10, 10) tuesday,
apex_item.text (3, a.ts_wd3, 10, 10) wednesday,
apex_item.text (4, a.ts_wd4, 10, 10) thursday,
apex_item.text (5, a.ts_wd5, 10, 10) friday,
apex_item.text (6, a.ts_wd6, 10, 10) saturday,
apex_item.text (7, a.ts_wd7, 10, 10) sunday,
apex_item.text (8, a.ts_remarks, 70, 128) remarks
from tb_opti_emp_ts a, tb_opmi_proj_act_map b
WHERE a.proj_ref = b.proj_ref
AND a.rel_id = b.rel_id
AND a.act_code = b.act_code
AND a.emp_id = '''||:P7_EMPLOYEE||'''
AND b.rel_id = '''||:P7_RELEASE_ID||'''
AND a.proj_ref = '''||:P7_PROJ_REF||''';';
ELSIF (:P7_RELEASE_ID is null) then
v_query := 'SELECT 1 FROM dual WHERE 1=0';
else
[code for generating my requirement in case the input is legit and there is no data in the timesheet table.]
END IF;
return(v_query);
END;
Please could someone help me????
Also in either case, whether data is generated from the join if already existing or if no data exists, I need to then insert the data or update it accordingly and have no idea how to proceed.
I know the solution will be a lengthy one but please its urgent and I am stuck. Please any help would be greatly appreciated.
Thanks in advance……

Hi all,
In response to my previous post, I would like to update that I have been able to generate my required region.
Now the final query is as follows:
DECLARE
v_query varchar2(10000);
v_count number;
BEGIN
select count(*) into v_count from tb_opti_emp_ts where emp_id=:P7_EMPLOYEE and proj_ref=:P7_PROJ_REF and rel_id=:P7_RELEASE_ID;
IF ((:P7_RELEASE_ID is not null) and (v_count>0)) THEN
v_query := 'SELECT b.act_code activities,apex_item.text (1, a.ts_wd1, 10, 10) monday,apex_item.text (2, a.ts_wd2, 10, 10) tuesday,apex_item.text (3, a.ts_wd3, 10, 10) wednesday,apex_item.text (4, a.ts_wd4, 10, 10) thursday,apex_item.text (5, a.ts_wd5, 10, 10) friday,apex_item.text (6, a.ts_wd6, 10, 10) saturday,apex_item.text (7, a.ts_wd7, 10, 10) sunday,apex_item.text (8, a.ts_remarks, 70, 128) remarks from tb_opti_emp_ts a, tb_opmi_proj_act_map b WHERE a.proj_ref = b.proj_ref
AND a.rel_id = b.rel_id
AND a.emp_id = '''||:P7_EMPLOYEE||'''
AND b.rel_id = '''||:P7_RELEASE_ID||'''
AND a.proj_ref = '''||:P7_PROJ_REF||''';';
ELSIF (:P7_RELEASE_ID is null) then
v_query := 'SELECT 1 FROM dual WHERE 1=0';
else
v_query:='select (select act_desc from tb_opmi_act_code a where a.act_code=b.act_code) as activities,apex_item.text(1,null) Monday,apex_item.text(2,null) Tuesday,apex_item.text(3,null) Wednesday,apex_item.text(4,null) Thursday,apex_item.text(5,null) Friday,apex_item.text(6,null) Saturday,apex_item.text(7,null) Sunday,apex_item.text(8,null) Remarks from tb_opmi_proj_act_map b where proj_ref='''||:P7_PROJ_REF||''' and rel_id='''||:P7_RELEASE_ID||''';';
END IF;
return(v_query);
END;
Now I have created a button which have dynamic action as its on click action. Now in the dynamic action I have to write the code for inserting/updating the data in the timesheet table.
I need help with it please its urgent..........

Similar Messages

  • Query for create manual tabular form using apex collection using item textfield with autocomplete

    can we create a manual tabular form inside item textfield with autocomplete ?
    how it is possible?
    with Apex_item API used for this item.
    i used this code for creat  cascading select list
    select seq_id,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(
            p_idx                       =>   1,
            p_value                     =>   c001,
            p_query                     =>   'SELECT C001 D
         , C002 R
      FROM APEX_COLLECTIONS
    WHERE COLLECTION_NAME = ''col1''',
            p_attributes                =>   'style="width:150px" onchange="f__name(this,parseInt(#ROWNUM#));"',
            p_show_null                 =>   'Yes',
            p_null_value                =>   null,
            p_null_text                 =>   '- Select name -',
            p_item_id                   =>   'f01_'|| LPAD (ROWNUM, 4, '0'),
            p_item_label                =>   'Label for f01_#ROWNUM#',
            p_show_extra                =>   'NO') name,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(
            p_idx                       =>   2,
            p_value                     =>   c002,
            p_query              =>   ' SELECT null d, null r FROM dual WHERE 1 = 2
            p_attributes                =>   'style="width:150px"',
            p_show_null                 =>   'Yes',
            p_null_value                =>   null,
            p_null_text                 =>   '- Select name -',
            p_item_id                   =>   'f02_'|| LPAD (ROWNUM, 4, '0'),
            p_item_label                =>   'Label for f02_#ROWNUM#',
            p_show_extra                =>   'NO')name2,
    from apex_collections
    where
    collection_name = 'COLLECTION1'
    It is fine .
    but i want item in tabular form  textfield with autocomplete and remove select list. my requirement is using textfield with autocomplete select a employee name and second item textfield with autocomplete display dependent perticular employee related multiple task.
    how it is created.i have no idea related textfield with autocomplete.Please help me....

    pt_user1
    I understand that the add row button is currently doing a submit.
    To not submit the page you need a dynamic action on the page.
    Does the javascript function addRow do what you want?
    Otherwise have a look at the following two threads Add row in manual tabular form using dynamic action and Accessing Tabular Form & Add Elements to Collection without Page Submit.
    You're process could be something like:
    Add the new values to the collection using the idea's in the second thread and at the same time add the new row.
    And as second action refresh your tabular form.
    If you get stuck set up what you have done on apex.oracle.com using the tables from the demo application.
    Nicolette

  • Query for create manual tabular form using apex collection add row button functionality

    Hello everyone
    My requirement is i created a tabular form manually using apex collection but if i click on add row button then previously selected data refreshed and added new row in this form it is fine.but i don't want to refreshed previously selected data and click on add row button then add new row .how it is possible? plz help
    Thanks & Regards,
    Ujwala

    Ujwala
    Instead of starting a new thread with the same question as Query for create manual tabular form using apex collection add row button functionality.
    Could you answer the question about what you see while debug the javascript code.
    If you don't understand the question or have trouble debug javascript let us know.
    Nicolette

  • Issue with APEX_ITEM.CHECKBOX in Manual Tabular Form report

    Hi,
    I have a simple manual tabular form report with query :
    SELECT
    APEX_ITEM.CHECKBOX(1,order_id) ,
    APEX_ITEM.TEXT(3,Ord_number) ,
    APEX_ITEM.TEXT(4,ord_flag)
    from
    tbl_order
    and a process to update the value of Ord_number & ord_flag columns for the selected (Checked) rows.
    FOR i in 1..apex_application.g_f01.count
    loop
    UPDATE
    tbl_order
    SET
    Ord_number = apex_application.g_f03(i),
    ord_flag = apex_application.g_f04(i)
    WHERE
    order_id = apex_application.g_f01(i);
    END LOOP;
    But the values getting updated wrongly , how can I ensure the exact values is retrieved in apex_application.g_f03(i) & apex_application.g_f04(i) ?
    Regards.
    Benz

    I think the row selector is there if you create an tabular form. However, you can create it yourself following this example:
    http://apex.oracle.com/pls/otn/f?p=31517:170
    Basically,
    apex_item.checkbox (30,
                               '#ROWNUM#',
                               'onclick="highlight_row(this,' || ROWNUM || ')"',
                               NULL,
                               'f30_' || LPAD (ROWNUM, 4, '0')
                              ) delete_checkboxDenes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.opal-consulting.de/training
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • How to Multi Row Update function in Manual Tabular Form

    Hi All,
    In my application I am using manual tabular form, for Update and insert i have written pl/sql process,
    but i want to make use of MULTI_ROW_UPDATE function for update and insert operations.
    How can I implement default tabular form behaviour in manual tabular form.
    I am using:
    Oracle Database 11g
    ApEx Version 4.0
    please help me, it's urgent.
    thanks
    MR

    Hi Joao,
    First Can u pl let us know your view is based on how many
    tables?
    If it is a simple view ,you can open the form in update mode
    passing a parameter to it thru a procedure or thru a url or what
    ever you feel like(form to form,etc)..I will give you an example
    on how to open the form in update mode like below..
    1.develop a form based on a simple view
    2.Call that form Thru a simple URL
    3.In the above you are opening a form with module id
    ex:1234567890 in update mode and change portal30 to suit
    accordingly..
    4.You are passing a parameter called "ABCDEF" TO "NAME" Field to
    that form for querrying..
    5.Now the form will be opened in update mode and all the fields
    are pertaining to the parameter "ABCDEF" and you can update the
    fields....
    II..Now regarding the check boxes i need to know which version
    of the portal are u using..As for as my knowledge goes (up to
    3.0.6) there are lot of bugs with the check boxes and check box
    checked value is always "yes"(if u want to insert in to the data
    base).So try not to depend on checkboxes and instead Combo is
    the right answer till oracle portal is free of bugs.
    No triggers are required for your requirement....
    Hope i have answered your problem ...If any please revert back
    with full details
    Thanks
    Vishnu Singireddy

  • Apex_item.radiogroup using an LOV in a manual tabular form

    I'm on APEX 4.0.0.00.46 and I'm sure there must be an obvious solution that I'm missing here, but I'm having a problem setting up an apex_item.radiogroup on a manual tabular form. This is the basic query that I'm using:
    select apex_item.radiogroup(37,my_field) as my_field
    from my_table
    When I use the above query as my Region Source, it compiles fine. However, it seems as though the query won't pull in the value that currently exists in the table unless I set the Column Attribute called 'Display As' for the field to 'Standard Report Column'. When I do this, it seems to remove the capability to incorporate a LOV into the radio group. I'm attempting to incorporate a query like this into the radiogroup:
    select 'YES' d, 'Y' r
    from dual
    UNION ALL
    select 'NO' d, 'N' r
    from dual
    So, to recap, I can set up a Radio Group (query based LOV), but if I do, the query of the table will not pull in the current value from the table. If I change the 'Display As' Column Attribute to 'Standard Report Column', I can no longer incorporate the LOV. Please help if you have any ideas.

    I am not 100% sure what you are trying to do but I think I am close. Try using
    SELECT apex_item.radio_group_from_query
              (37,
               my_field,
               'SELECT ''YES'' d, ''Y'' r FROM dual
                UNION ALL
                SELECT  ''NO'' d, ''N'' r FROM dual'
              ) AS my_field
      FROM my_tableDenes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/otn/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

  • Problem in saving BLOB on a manual tabular form

    Hi All,
    I have a manual tabular form which has one column as file browse (blob). When I browse and select some file to save with the row, it saves only the name of the file, not the actual file.
    The example form is available on apex.oracle.com. The page has a process called SAVE which is supposed to save the record with blob.
    Workspace: bobforum
    user: forum
    password: abc123
    Application: 39196
    Page: 1
    I will appreciate if someone can help.
    Thanks,
    Zkay

    Hi,
    What I did check, apex_application.g_fnn array do not work for this.
    From Google I did found that it has work in previous APEX version.
    Something has changed and e.g. Denis example for multiple file browser do not work anymore.
    http://htmldb.oracle.com/pls/otn/f?p=31517:161
    I did manage upload files to wwv_flow_files table when using apex_application.g_xnn.
    I did add derived column to report. To HTML expression I did place
    <input type="file" name="x0#ROWNUM#" />
    This way you could have report that shows max 20 rows in pagination page.
    But I did not find way to identify file uploaded to flow files.
    In After submit process apex_application.g_xnn seems have null value,
    so I could not query wwv_flow_files by name column and insert file to my own table.
    Regards,
    Jari

  • Manual Tabular form

    Hi everyone,
    I have created a maual tabular form with the help of (HOW TO) document in OTN.For that I wrote maual update and manual delete process and evething is working fine.But in the manual update process i did not include the code to compare the checksum of the submitted data with the old data (still its working fine).But in my application i have created several manual tabular forms like this .Do the application get any problem in the futher as i am not checking the checksum.If i compare the checksum i am getting error.I decoded that error by
    inserting the checksum values to a (test table).The checksum values for a row is changing even if there is no change in the data of the table.
    any suggestions please
    Here is my code
    declare
    l_cks wwv_flow_global.vc_arr2;
    j pls_integer := 1;
    begin
    -- Get original MD5 checksum
    -- select wwv_flow_item.md5( column1,column2,column3,column4) cks
    -- BULK COLLECT INTO
    --l_cks
    -- from table;
    -- Compare the original checksum, l_cks,
    -- with submitted checksum, htmldb_application.g_fcs.
    -- If they are different, raise an error.
    -- for i in 1..l_cks.count
    --loop
    --if htmldb_application.g_fcs(i) != l_cks(i) then
    -- rollback;
    --raise_application_error(
    -- -20001,
    -- 'Current version of data in database has changed '||
    -- 'since user initiated update process.');
    -- return;
    --end if;
    --end loop;
    -- update EMP
    for i in 1..htmldb_application.g_f07.count
    loop
    if htmldb_application.g_f07(i) is not null then
    update table
    set
    column2 = replace(htmldb_application.g_f08(i),'%'||'null%',NULL)
    where column1 = htmldb_application.g_f07(i);
    else
    if htmldb_application.g_f08(i) is not null then
    insert into table
    ( column1 ,
    column2,
    column3)
    values
    replace(htmldb_application.g_f08(i),'%'||'null%',NULL));
    end if;
    end if;
    end loop;
    end;
    Thanks
    phani

    Phani,
    I don't understand what you have working, what does not work, and what that code does (much of it is commented out). Can you put an example on apex.oracle.com that shows the problem?
    Scott

  • Apex Collection- Tabular Form

    Hi
    is there anyway to make a tabular form depends on apex collections, for example i have a collection named "Orders" and i want to add member to this collection by tabular form , is it possible?
    Thanks in advance

    Sure, build a manual tabular form
    SELECT APEX_ITEM.TEXT(1,AC.c001)
              ,APEX_ITEM.TEXTAREA(1,AC.c002)
    FROM apex_collections AC
    WHERE collection_name = <collection name>I can also think of an approach to get this working with a Wizard based tabular form(I haven't tried this before,but I don't see any reason why it shouldn't work).
    --Create a view referring the collection.
    --Change your tabular form to reference the view
    --Add insert,update and delete triggers on the view to handle those processes on the appropriate table(s).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Select List in Manual Tabular Form based on a previous column

    I have a manual tabular form that have several columns One column (vendor) is a select list that should be based on a previous column (Vendor Type - Internal/External). So if the user selects Internal for Vendor Type, the Vendor column's select list should only contain those vendors with type of Internal. By the way, it also uses APEX collections.
    select
      apex_item.hidden                   (1,C015) STATUS,
      apex_item.checkbox                 (2,SEQ_ID,'title="check to delete"') CHECKBOX,
      case
        when (c001 is not null and c002 is not null) then
          '<a onclick="return false;" href="f?p='||:APP_ID||':20:'||:APP_SESSION||'::NO:20:P20_ID,P20_REQ_ID,P20_SEQ_ID:'||C001||','||C002||','||SEQ_ID||'"><img alt="" src="/i/ed-item.gif"></a>'
      end ||
      apex_item.hidden                   (4,C001) ID,
      apex_item.hidden                   (5,C002) JOB_QUOTE_ID,
      apex_item.date_popup2              (6,C003,'MM/DD/YYYY',11,2000,'onChange="f_set_end_date(this.id,'|| ROWNUM || ');"') ||
      apex_item.select_list_from_query   (7,C004,'select svcs_description d, svcs_code r from csrsr_service_codes order by 1 asc',null,'YES',null,'-Select-') || '<BR />' ||
      apex_item.date_popup2              (8,C005,'MM/DD/YYYY',11) ||
      apex_item.text                     (9,C006,8,15,'style="text-align:right;"') || '<BR />' ||
      apex_item.select_list              (10,C007,'Staff;S,External;E',null,'YES',null,'-Select-') ||
      apex_item.select_list_from_query_xl(11,C008,'select vendor_name d, vendor_number r from csrsr_vendors_v',null,'YES',null,'-Select-') || '<BR />' ||
      apex_item.text                     (12,C009,50,100,'colspan=2') COL12,
      apex_item.text                     (13,to_char(to_number(C010),'FML999G999G999G999G990D00'),10,15,'style="text-align:right;"') AMT1,
      apex_item.text                     (14,to_char(to_number(C011),'FML999G999G999G999G990D00'),10,15,'style="text-align:right;"') AMT2,
      apex_item.text                     (15,to_char(to_number(C012),'FML999G999G999G999G990D00'),10,15,'style="text-align:right;"') AMT3,
      apex_item.text                     (16,to_char(to_number(C013),'FML999G999G999G999G990D00'),10,15,'style="text-align:right;"') AMT4,
      apex_item.hidden                   (24,C001) ||
      apex_item.hidden                   (25,C002) ||
      apex_item.hidden                   (3,SEQ_ID) ||
      apex_item.text                     (17,to_char(to_number(C014),'FML999G999G999G999G990D00'),10,15,'style="text-align:right;"') CHBK_AMT,
      'value' COLTYPE
    from
      apex_collections
    where
      collection_name = 'CSRSR_JOBCOSTS_C' and
      C015 in ('O','U','N')
    union all
    select
      apex_item.hidden                   (1,null) STATUS,
      apex_item.checkbox                 (2,null,'title="check to delete"') CHECKBOX,
      apex_item.hidden                   (24,null) ||
      apex_item.hidden                   (4,null) ID,
      apex_item.hidden                   (25,null) ||
      apex_item.hidden                   (5,null) JOB_QUOTE_ID,
      apex_item.date_popup2              (6,null,'MM/DD/YYYY',11,2000,'onChange="f_set_end_date(this.id,'|| ROWNUM || ');"') ||
      apex_item.select_list_from_query   (7,null,'select svcs_description d, svcs_code r from csrsr_service_codes order by 1 asc',null,'YES',null,'-Select-') || '<BR />' ||
      apex_item.date_popup2              (8,null,'MM/DD/YYYY',11) ||
      apex_item.text                     (9,null,8,15,'style="text-align:right;"') || '<BR />' ||
      apex_item.select_list              (10,null,'Staff;S,External;E',null,'YES',null,'-Select-') ||
      apex_item.select_list_from_query_xl(11,null,'select vendor_name d, vendor_number r from csrsr_vendors_v',null,'YES',null,'-Select-') || '<BR />' ||
      apex_item.text                     (12,null,50,100,'colspan=2')  COL12,
      apex_item.text                     (13,null,10,15,'style="text-align:right;"') AMT1,
      apex_item.text                     (14,null,10,15,'style="text-align:right;"') AMT2,
      apex_item.text                     (15,null,10,15,'style="text-align:right;"') AMT3,
      apex_item.text                     (16,null,10,15,'style="text-align:right;"') AMT4,
      apex_item.hidden                   (24,null) ||
      apex_item.hidden                   (25,null) ||
      apex_item.hidden                   (3,null) ||
      apex_item.text                     (17,null,10,15,'style="text-align:right;"') CHBK_AMT,
      'value' COLTYPE
    from
      dual
    How can I accomplish this?
    Application Express 4.1.2    
    Oracle 10g Rel 2
    Robert

    Hi,
    Then you are probably looking cascading select list in tabular form?
    http://dbswh.webhop.net/htmldb/f?p=BLOG:READ:0::::ARTICLE:2003800346210117
    Regards,
    Jari

  • Column Link is not working on a Manual Tabular Form

    Hello,
    I am having some issues creating a link on a column based on a manual tabular form (I am using Apex 4.1.1.00.27, Oracle DB 10.2.0.5.0):
    On my page 1, I created a process that deletes and creates a collection based on the “emp” table; then, I have a manual tabular form based on that collection; and finally, a link on the “deptno” column of the manual tabular form that points to my Page 2 (department form) and it’s passing the parameter P2_DEPTNO:#DEPTNO#.
    The problem is that when I press the link, the page is not submitting the DEPTNO value. Also, I notice that as soon as I specify the column as a link column, it does not show the value in my tabular form, but if I remove the link, it shows the value correctly.
    I created an example on apex.oracle.com in case some of you want to look into it:
    Workspace: EDIAZJORGE
    Username: test
    Password: test123
    App Name: Sample App
    App Number: 12231
    I appreciate any ideas or suggestions on how to solve this issue.
    Thank you,
    Erick

    Hello,
    Try following code
    SELECT APEX_ITEM.HIDDEN(1,C001) EMPNO,
           APEX_ITEM.TEXT(2,C002) ENAME,
           APEX_ITEM.TEXT(3,C003) JOB,
           APEX_ITEM.TEXT(4,C004) MGR,
           APEX_ITEM.TEXT(5,C005) HIREDATE,
           APEX_ITEM.TEXT(6,C006) SAL,
           APEX_ITEM.TEXT(7,C007) COMM,
           '&lt;a href="f?p=&APP_ID.:2:&APP_SESSION.:::2:P2_DEPTNO:'||C008||'"><img src="/i/ws/small_page.gif"></a>' DEPTNO
    FROM APEX_COLLECTIONS
    WHERE COLLECTION_NAME = 'EMP_COLLECTION'
    UNION ALL
    SELECT APEX_ITEM.HIDDEN(1,NULL) EMPNO,
           APEX_ITEM.TEXT(2,NULL) ENAME,
           APEX_ITEM.TEXT(3,NULL) JOB,
           APEX_ITEM.TEXT(4,NULL) MGR,
           APEX_ITEM.TEXT(5,NULL) HIREDATE,
           APEX_ITEM.TEXT(6,NULL) SAL,
           APEX_ITEM.TEXT(7,NULL) COMM,
           APEX_ITEM.TEXT(8,NULL) DEPTNO      
    FROM DUALFor existing data, it will display as link and for new data, it will still display as text box.
    Please note that you should display DEPTNO as standard column and not as LINK.
    Regards,
    Hari
    Escaped < in tags :)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Dynamic Manual Tabular form

    Hi friends,
    I have been working on a timesheet application for which i need to create a manual tabular form in apex 4.1. I created a page with 3 items based on whose values the form should be generated. I created a report region in the page with the source code as
    DECLARE
    v_query varchar2(10000);
    BEGIN
    IF :P7_RELEASE_ID is not null THEN
    v_query := 'SELECT b.act_code activities,
    apex_item.text (1, a.ts_wd1, 10, 10) monday,
    apex_item.text (2, a.ts_wd2, 10, 10) tuesday,
    apex_item.text (3, a.ts_wd3, 10, 10) wednesday,
    apex_item.text (4, a.ts_wd4, 10, 10) thursday,
    apex_item.text (5, a.ts_wd5, 10, 10) friday,
    apex_item.text (6, a.ts_wd6, 10, 10) saturday,
    apex_item.text (7, a.ts_wd7, 10, 10) sunday,
    apex_item.text (8, a.ts_remarks, 70, 128) remarks
    from tb_opti_emp_ts a, tb_opmi_proj_act_map b
    where a.proj_ref=b.proj_ref= '||:P7_PROJ_REF||' and a.rel_id=b.rel_id= '||:P7_RELEASE_ID||' and a.emp_id= '||:P7_EMPLOYEE;
    ELSE
    v_query := 'SELECT 1 FROM dual WHERE 1=0';
    END IF;
    return(v_query);
    END;
    I have checked the option 'Use Generic Column Names (parse query at runtime only)' under source and the type is SQL query(pl/sql function body returning sql query)
    in this the 3 page items are P7_PROJ_REF,P7_RELEASE_ID and P7_EMPLOYEE.
    Now i have created a button which unconditionally branches to the same page and submits the page so on clicking it the data should be generated. I am getting the 'no data found' when the page items are blank but when i am passing legit data in the items(btw, all three are pop-up LOV's), i am getting an error
    failed to parse SQL query:
    ORA-00933: SQL command not properly ended.
    Please I have been working for hours but not getting the solution...
    Anyone with solution plz.............

    Put your actual query in the report region SQL Query box, Specifying SQL Query as opposed to Function Returning SQl Query
    As follows:
    SELECT b.act_code activities,
    apex_item.text (1, a.ts_wd1, 10, 10) monday,
    apex_item.text (2, a.ts_wd2, 10, 10) tuesday,
    apex_item.text (3, a.ts_wd3, 10, 10) wednesday,
    apex_item.text (4, a.ts_wd4, 10, 10) thursday,
    apex_item.text (5, a.ts_wd5, 10, 10) friday,
    apex_item.text (6, a.ts_wd6, 10, 10) saturday,
    apex_item.text (7, a.ts_wd7, 10, 10) sunday,
    apex_item.text (8, a.ts_remarks, 70, 128) remarks
    from tb_opti_emp_ts a, tb_opmi_proj_act_map b
    where a.proj_ref=b.proj_ref= :P7_PROJ_REF and a.rel_id=b.rel_id= :P7_RELEASE_ID  and a.emp_id= :P7_EMPLOYEE;In the conditions for the report region to display specify ITEM NOT NULL and P7_RELEASE_ID (without the colon) in the Expression 1 box

  • Document.getElementById Manual Tabular Form

    Hi,
    I’m working with APEX 4.1 and a manual tabular form.
    I have a page level validation process that fires and ensures that the value in column 1 does not match the value in column 6. When it does it pops up an error message along the lines of: The project MY PROJECT (Row2) cannot be a default of itself.
    That all works as it should but the bit I cannot figure out how to do is a background colour change in either the column 1 field of the invalid row or the entire invalid row.
    The code (function returning and error) I’m using is:
    DECLARE
    l_error VARCHAR2 (4000);
    BEGIN
    FOR i IN 1 .. apex_application.g_f49.count
    LOOP
    IF apex_application.g_f01(i) = NVL (apex_application.g_f06(i), -1)
    THEN
    l_error := l_error
    || CASE
    WHEN l_error IS NULL
    THEN NULL
    ELSE '
    END
    || ' The project '
    -- Project name
    || apex_application.g_f02(i)
    || ' '
    -- I believe it is this bit that is wrong
    || '<a onclick="document.getElementById('''
    || 'f02_'
    || LPAD (i, 4, '0')
    || ''').style.background =''#FCCFCC'';'
    || '$f_First_field('''
    || 'f02_'
    || LPAD (i, 4, '0')
    || ''')'
    || '" href="#"'
    || '>'*/
    -- Get the row
    || '(Row ' || i || ')'
    || '</a>'
    || ' cannot be it''s own default. '
    END IF;
    END LOOP;
    RETURN LTRIM (l_error, '</br>');
    END;
    Would someone be so kind as to point out the error of my ways?
    Many thanks for your time,
    Danny
    Edited by: DannyC on Oct 14, 2011 1:29 AM

    Hi Sanjay,
    Change the Report Column display type to Standard Report Column.
    Cheers

  • Date Picker on Manual Tabular form not working on 4.1 upgrade from 4.0

    Hi
    my application is upgrade from Apex 4.0 to 4.1 .
    Oracle DB is 11g.
    I have a manual tabular form with a date field:- apex_item.text(12,null,15,15,'class="datepicker3"') as end_date, After upgrade to 4.1 it's not working .
    I changed the code to:- apex_item.date_popup2(12,null,15,15) as end_date, still not working .
    I have to use apex_item.date_popup2 .
    Thanks in advance !!!
    -Amu

    Hi Diana,
    Is this you are trying to achieve:
    piepdate = startdate + typeduration
    The id attribute of the items in normal or APEX_ITEM based tabular form are of the type:
    fxx_xxxx
    For example: f10_0001, f10_0002, ..., f10_0010.
    So, correct the vRow variable accordingly
    >
    // get row
    var vRow = pThis.id.substr(pThis.id.indexOf('_')+1);
    >
    Hope it helps!
    Regards,
    Kiran

  • Manually tabular form question

    hi all
    i built a manually tabular form.
    i want that this tabular for will used only to update , and without the option of insert new row .
    two questions i have here according to the document :
    there is something called
    Adding Optimistic Lockingoptimistic locking
    is that possible to do it if it's only an update form?
    i've tried to do it and not really succeeded.
    second question is about collection
    again is this possible to do it if i built only an update form ?
    thanks for quick response

    Hi Naama,
    >> i've created the package , it's show like it done but then i cannot see it.what seems to be the problem ?
    I have no idea, but this is definitely something local in your database. Just drop the package and re-create it. If the Object Browser doesn’t show you the package, try to use SQL*Plus.
    >> what is the meaning of this package?
    is this package active only in the tabular manually form ?.
    This is a regular PL/SQL package, and with the proper privileges, can be used anywhere on the database, with or without APEX connection.
    This package is “special” because it’s includes all you need to manage Optimistic Locking, which is characteristic to Web based applications. Other than that, you can use it whenever you need to manipulate the related table(s).
    >> the apex know in which part to relate in the package right ?
    APEX don’t know anything. When you are building a manual tabular form, it is also your responsibility to construct the proper DML processes. If you want your tabular form to support insert/update/delete you’ll need to construct three processes, each with the proper DML statement, each condition by the proper button. In your private case, as you need to support update only, you’ll need to build only one DML process (PL/SQL anonymous block), which will call the proper update procedure from the package.
    >> thank you
    Naama
    Wow! You signed your name correctly :) You should amend your handle to reflect that.
    Best Regards,
    Arie.

Maybe you are looking for

  • HT201272 cant find the movie i downloaded

    cant find the movie i rented and downloaded.

  • Export job

    As part of my backup policy I want to create a Grid Control schedule job executing an export command. I have created a OS type job with this command in one line: export ORACLE_HOME=/oracle/ora10g ; export ORACLE_SID=psep10g1 ; export NLS_LANG=spanish

  • BRCONNECT with error -1017 at location db_connect-2 when installationsap

    Hi guys, I am experiencing some problems when I install the NW CE7.1 with SID CE1 on Windows server with oracle. Note,At this server , the PI7.1 have been installed with SID PI1, now I want to install the CE7.1 on that with MCOD,  the oracle db insta

  • Trouble building project in netbeans 5.0

    I am working on a project for school. However, when I run the program I get the following message and the program doesn't display. I do have the setvisible method in the main ,but I am unable to see my project. Can someone please help me regarding wh

  • OSX 10.4.8 app launch difficulties!

    I updated to 10.4.8 through software update and although it indicated that there was an 'error' with the update, my cpu showed the OSX as 10.4.8 Many apps work fine but when I went to launch some others, they won't launch and below is a sampling of t