How to create a manual tabular form with DELETE capability

Since the wizard tabular form does not allow the use of checkboxes, I am building my tabular form manually following the HOW-TO document. I will need to be able to delete rows in the form in addition to inserting and updating. Is there a document somewhere that describes how to do this? The how-to doesn't cover it and I have searched the forums to no avail.
Thanks.
Darin

To create dynamic checkbox you can do the following:
SELECT HTMLDB_ITEM.CHECKBOX(1,"your database field name", 'unchecked or checked') " "
FROM YOUR_TABLE_NAME OR DUAL;
...then...
In order to extrapolate the checkbox value you use following array:
htmldb_application.g_f01("subscript value)"
This array will contain value of checkbox. At this point you can do this:
if htmldb_application.g_f01("subscript value)" = 'Y'
THEN
INSERT DATA...
DELETE DATA...
END IF;
Hope this somewhat helps...
NOTE: I have entered a lot of pseudo values/code but I believe you can fill in the blanks for what you need.

Similar Messages

  • Creating a manual tabular form on an empty table

    Hi all,
    I am trying to create a manual tabular form on an empty table. Is it possible to display textboxes and column headers, when I run the report I get "no data found".
    Regards,

    Hi Denes and thank you for your valuable input.
    My problem is in fact that, I have created the tabular form by using a report region with a SQL query, something like,
    select apex_item.display_and_save(1, p.bolge) bolge,
    apex_item.display_and_save(2, p.hafta) hafta,
    apex_item.display_and_save(3, p.yil) yil,
    apex_item.display_and_save(4, p.mamul) mamul,
    apex_item.display_and_save(5, p.tahmin1) tahmin1,
    apex_item.display_and_save(6, p.tahmin2) tahmin2,
    apex_item.display_and_save(7, p.tahmin3) tahmin3,
    apex_item.display_and_save(8, p.tahmin4) tahmin4,
    apex_item.display_and_save(9, p.tahmin5) tahmin5,
    apex_item.display_and_save(10, p.tahmin6) tahmin6,
    apex_item.display_and_save(11, p.revize4) revize4,
    apex_item.display_and_save(12, p.revize5) revize5,
    apex_item.display_and_save(13, p.revize6) revize6
    from portal_link.v_planlama p
    The problem is that, since there is no data in the table, when I run the page, I cant get the form to be rendered, and I get a nice "no data found". There should be a way to get the form rendered, hence making it available for data input.
    Regards,
    Onur

  • How to create am email subscribe form with EA?

    I know how to create the input elements, but how I create the form element directly in EA?

    Thanks. I have it working now.
    One problem working with most e-mail list providers is that the response, when someone subscribe to a list, is anew html page that replaces the one you have. In most cases that is not an issue, but if you want to keep the flow in your page it is.
    The typical way to solve the problem is by not using the default forms, but by creating one that works through a PHP or other server side script that can receive a response that can handle anyway you want on the fron end.
    Since I am trying to see what can I do without depending in particular sewrver side code, that was not an option for me.
    The way I solved was dynamically creating an iframe inside EA so the response html page will be restricted to that area, which I can manipualte from EA.

  • How to create barcode in Smart Forms with MS Word as Editor?

    Hi,
    I created a character format for a barcode in a smart style.
    The problem is that I do not know how to assign it to the text in Smart Form because the Editor is MS Word and not the normal Editor.
    Any suggestion or idea.
    Thanks & best regards
    Viktoria

    Hi and thanks for the fast reply,
    I have created a smartstyle and also a characterformat for the barcode. This is not the problem.
    I call the layout via HRFORMS. The Form Builder for Smart Forms is called and the Editor for the text nodes is preset and is the MS Word editor. This cannot be changed. I tried different things also in the settings. The normal text editor cannot be called.
    I choose and enter the field that I want to convert into the barcode &wa_barcode&. I do not work with standard texts (SO10). The text field is a normal text node in Smart Forms. The character format that applies converts the number in the variable field into the barcode.
    In the MS word editor I have only formats that are in the office environment (arial, ...) I do not see the formats that I created in smartstyle also when I assign it in the output options of the text node.
    So maybe I have to work like this for now. Swich between HRFORMS and SMARTFORMS when working with barcodes. In the Smart Forms transaction it is the normal editor where I can see the paragraph/ character formats from smartstyle.
    Thanks and best regards
    Viktoria

  • How to create a timer in forms with out using pjc

    Any body help me rgarding this matter..
    plez..

    That i know but how i assign this timer in an objects..like text bos or dispplay item????

  • Tabular form with non base table field

    I want to develop a tabular form with
    1. A non-base table edit field to accept a value
    2. Insert/update another table based on the input value
    3. Also, computed field on each row based on other fields on the records (like post-query trigger in oracle forms at block level - for each row)
    Thanks,
    Rachna

    Thanks for your reply.
    Varad, I like the link you sent me. It has a lot of good information.
    I created a process (under page processing) called "Update/Insert Process" that dosn't seem to be working.
    Question, I created a manual tabular form with SQL Query and created a process (under page processing) called "Update/Insert Process", then I check for each record in the tabular form. If the old value <> new value then I update/insert in the new table.
    Any step by step will be highly apprciated - to create process/validation etc.
    Thanks,
    Rachna

  • 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

  • Sort Nulls First with Manual Tabular Form????

    I just created a manual tabular form and it appears to be in working order. Now I need to order the report results on 2 columns (which I have working using the sort sequence in the column attributes), but I also need the blank row (added row) to appear on top of the results.
    What do I need to do to add the blank row on top?? Sort Null: First does not work in my case.
    Thank you,
    Tammy

    select
      apex_item.hidden(1,null) log_id,
      apex_item.text(2,null) empty_field,
      apex_item.text(3,null) log_date,
      apex_item.text(4,null) z_time,
      apex_item.text(5,null) log_lead,
      apex_item.text(6,null) log_event,
      apex_item.text(7,null) project_id,
      apex_item.text(8,null) status,
      apex_item.checkbox(9,null) chkbx,
      apex_item.hidden(10,null) seq_id
    from dual
    connect by level < 4
    union all
    select
      apex_item.hidden(1,c001) log_id,
      apex_item.text(2,c002) empty_field,
      apex_item.text(3,c003) log_date,
      apex_item.text(4,c004) z_time,
      apex_item.text(5,c005) log_lead,
      apex_item.text(6,c006) log_event,
      apex_item.text(7,c007) project_id,
      apex_item.text(8,c008) status,
      apex_item.checkbox(9,seq_id) chkbx,
      apex_item.hidden(10,seq_id) seq_id
    from apex_collections
    where collection_name = 'LOG_ENTRIES'

  • 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

  • Checksum error in Manual Tabular Form

    Hi everyone,
    I have created 2 (manual tabular forms) on a same page but i am getting checksum error for one of the tabular form.
    Here is my code:
    1 st Tabular Form:
    select
    x.del,
    x.ECGEXST_ID,
    x.LEAD_CD,
    x.ST_ID,
    x.ENTERED_DTS,
    X.ENTERED_BY_NM,
    X.UPDATED_DTS,
    X.UPDATED_BY_NM,
    x.cks
    from (
    select
    htmldb_item.checkbox(1,ECGEXST_ID) del,
    htmldb_item.hidden(2,ECGEXST_ID) ECGEXST_ID,
    htmldb_item.select_list_from_query (3, LEAD_CD,'select lead_cd , lead_cd from lslead order by display_seq ',15) LEAD_CD,
    htmldb_item.select_list_from_query(5,ST_ID,'select lkup_dsc,lkup_id from lkup where lkup_grp_id = 17',25) ST_ID,
    wwv_flow_item.display_and_save(6,to_char(ENTERED_DTS,'MM/DD/YYYY')) ENTERED_DTS,
    au.LAST_NM || ', ' || au.FIRST_NM ENTERED_BY_NM,
    wwv_flow_item.display_and_save(7,to_char(UPDATED_DTS,'MM/DD/YYYY')) UPDATED_DTS,
    au1.LAST_NM || ', ' || au1.FIRST_NM UPDATED_BY_NM,
    htmldb_item.md5_checksum(ECGEXDT_ID,LEAD_CD,ST_ID,ENTERED_DTS,ENTERED_BY_MSPR_ID) cks
    from ECGEXST,
    app_user au,app_user au1 where au.MSPR_ID(+) = ECGEXST.ENTERED_BY_MSPR_ID and au1.MSPR_ID(+) = ECGEXST.UPDATED_BY_MSPR_ID
    and ECGEXDT_ID = :P65_ECGEXDT_ID
    union all
    select
    htmldb_item.checkbox(1,null) del,
    htmldb_item.hidden(2,null) ECGEXST_ID,
    htmldb_item.select_list_from_query (3,null,'select lead_cd , lead_cd from lslead order by display_seq ',15) LEAD_CD,
    htmldb_item.select_list_from_query(5,null,'select lkup_dsc,lkup_id from lkup where lkup_grp_id = 17',25) ST_ID,
    wwv_flow_item.display_and_save(6,null) ENTERED_DTS,
    null ENTERED_BY_NM,
    wwv_flow_item.display_and_save(7,null) UPDATED_DTS,
    null UPDATED_BY_NM,
    htmldb_item.md5_checksum(null,null,null,null,null) cks
    from dual) x
    UPDATE PROCESS:
    declare
    l_cks wwv_flow_global.vc_arr2;
    j pls_integer := 1;
    val1 varchar2(100);
    val2 varchar2(100);
    begin
    -- Get original MD5 checksum
    select wwv_flow_item.md5(ECGEXDT_ID,LEAD_CD,ST_ID,ENTERED_DTS,ENTERED_BY_MSPR_ID) cks
    BULK COLLECT INTO
    l_cks
    from ECGEXST where ECGEXDT_ID = :P65_ECGEXDT_ID;
    -- 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 ECGRSTST
    for i in 1..htmldb_application.g_f02.count
    loop
    if htmldb_application.g_f02(i) is not null then
    update ECGEXST
    set
    ECGEXDT_ID = :P65_ECGEXDT_ID,
    LEAD_CD = replace(htmldb_application.g_f03(i),'%'||'null%',NULL),
    ST_ID = replace(htmldb_application.g_f05(i),'%'||'null%',NULL)
    where ECGEXST_ID = htmldb_application.g_f02(i);
    else
    if htmldb_application.g_f03(i) is not null then
    insert into ECGEXST
    (ECGEXST_ID ,
    ECGEXDT_ID,
    LEAD_CD,
    ST_ID)
    values
    (ECGEXST_SEQ.nextval,
    :P65_ECGEXDT_ID,
    replace(htmldb_application.g_f03(i),'%'||'null%',NULL),
    replace(htmldb_application.g_f05(i),'%'||'null%',NULL));
    end if;
    end if;
    end loop;
    end;
    The first tabular form is working fine.But for the second tabular form i am getting the checksum error.I have created a test table and checked the checksum values.The checksum values are changing.
    Here is the code of my 2nd tabularform:
    select
    x.del,
    x.ECGEXT_ID,
    x.LEAD_CD,
    x.T_ID,
    x.ENTERED_DTS,
    X.ENTERED_BY_NM,
    X.UPDATED_DTS,
    X.UPDATED_BY_NM,
    x.cks
    from (
    select
    htmldb_item.checkbox(11,ECGEXT_ID) del,
    htmldb_item.hidden(12,ECGEXT_ID) ECGEXT_ID,
    htmldb_item.select_list_from_query (13, LEAD_CD,'select lead_cd , lead_cd from lslead order by display_seq ',15) LEAD_CD,
    htmldb_item.select_list_from_query(15,T_ID,'select lkup_dsc,lkup_id from lkup where lkup_grp_id = 18',25) T_ID,
    wwv_flow_item.display_and_save(16,to_char(ENTERED_DTS,'MM/DD/YYYY')) ENTERED_DTS,
    au.LAST_NM || ', ' || au.FIRST_NM ENTERED_BY_NM,
    wwv_flow_item.display_and_save(17,to_char(UPDATED_DTS,'MM/DD/YYYY')) UPDATED_DTS,
    au1.LAST_NM || ', ' || au1.FIRST_NM UPDATED_BY_NM,
    htmldb_item.md5_checksum(ECGEXDT_ID,LEAD_CD,T_ID,ENTERED_DTS,ENTERED_BY_MSPR_ID) cks
    from ECGEXT,
    app_user au,app_user au1 where au.MSPR_ID(+) = ECGEXT.ENTERED_BY_MSPR_ID and au1.MSPR_ID(+) = ECGEXT.UPDATED_BY_MSPR_ID
    and ECGEXDT_ID = :P65_ECGEXDT_ID
    union all
    select
    htmldb_item.checkbox(11,null) del,
    htmldb_item.hidden(12,null) ECGEXT_ID,
    htmldb_item.select_list_from_query (13,null,'select lead_cd , lead_cd from lslead order by display_seq ',15) LEAD_CD,
    htmldb_item.select_list_from_query(15,null,'select lkup_dsc,lkup_id from lkup where lkup_grp_id = 18',25) T_ID,
    wwv_flow_item.display_and_save(16,null) ENTERED_DTS,
    null ENTERED_BY_NM,
    wwv_flow_item.display_and_save(17,null) UPDATED_DTS,
    null UPDATED_BY_NM,
    htmldb_item.md5_checksum(null,null,null,null,null) cks
    from dual) x
    UPDATE PROCESS:
    declare
    l_cks wwv_flow_global.vc_arr2;
    j pls_integer := 1;
    val1 varchar2(100);
    val2 varchar2(100);
    begin
    -- Get original MD5 checksum
    select wwv_flow_item.md5(ECGEXDT_ID,LEAD_CD,T_ID,ENTERED_DTS,ENTERED_BY_MSPR_ID) cks
    BULK COLLECT INTO l_cks
    from ECGEXT where ECGEXDT_ID = :P65_ECGEXDT_ID;
    -- 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
    -- val1 := htmldb_application.g_fcs(i);
    -- val2 := l_cks(i);
    -- insert into test2 (val_1,val_2) values (val1,val2);
    rollback;
    raise_application_error(
         -20001,
         'Current version of data in database has changed '||
         'since user initiated update process.');
    return;
    end if;
    end loop;
    -- update ECGRSTST
    for i in 1..htmldb_application.g_f12.count
    loop
    if htmldb_application.g_f12(i) is not null then
    update ECGEXT
    set
    ECGEXDT_ID = :P65_ECGEXDT_ID,
    LEAD_CD = replace(htmldb_application.g_f13(i),'%'||'null%',NULL),
    T_ID = replace(htmldb_application.g_f15(i),'%'||'null%',NULL)
    where ECGEXT_ID = htmldb_application.g_f12(i);
    else
    if htmldb_application.g_f13(i) is not null then
    insert into ECGEXT
    (ECGEXT_ID ,
    ECGEXDT_ID,
    LEAD_CD,
    T_ID)
    values
    (ECGEXT_SEQ.nextval,
    :P65_ECGEXDT_ID,
    replace(htmldb_application.g_f13(i),'%'||'null%',NULL),
    replace(htmldb_application.g_f15(i),'%'||'null%',NULL));
    end if;
    end if;
    end loop;
    end;
    please help me in solving this.The same code its good for one tabular form and for the other it giving the checksum error.
    Thanks in advance
    phani

    Hi patrick,
    Thanks for the reply i am getting the checksum error even if i used my primary key in the select statement of the MD5 checksum.
    My primary key in the second tabular form is
    htmldb_item.hidden(12,ECGEXT_ID) ECGEXT_ID
    so i changed the process to:
    for i in 1..htmldb_application.g_f12.count
    loop
    if htmldb_application.g_f12(i) is not null
    then
    select wwv_flow_item.md5(ECGEXDT_ID,LEAD_CD,T_ID,ENTERED_DTS,ENTERED_BY_MSPR_ID) cks
    BULK COLLECT INTO l_cks
    from ECGEXT where ECGEXT_ID = htmldb_application.g_f12(i);
    -- Compare the original checksum, l_cks,
    -- with submitted checksum, htmldb_application.g_fcs.
    -- If they are different, raise an error.
    if htmldb_application.g_fcs(i) != l_cks(i) then
    -- val1 := htmldb_application.g_fcs(i);
    -- val2 := l_cks(i);
    -- insert into test2 (val_1,val_2) values (val1,val2);
    rollback;
    raise_application_error(
         -20001,
         'Current version of data in database has changed '||
         'since user initiated update process.');
    end if;
    end if;
    end loop;
    It's not possible to use BULK COLLECT to get the MD5 checksum of all >>>rows. Because the index positions in the MD5 array and the >>>apex_application.g_fxx array index will probably not match, especially if you >>>don't order or if you are on a second page.How come the first tabular form is running i used the bulk collect in the first tabular form
    HERE IS THE CODE FOR THE FIRST TABULAR FORM:
    -- Get original MD5 checksum
    select wwv_flow_item.md5(ECGEXDT_ID,LEAD_CD,ST_ID,ENTERED_DTS,ENTERED_BY_MSPR_ID) cks
    BULK COLLECT INTO
    l_cks
    from ECGEXST where ECGEXDT_ID = :P65_ECGEXDT_ID;
    -- 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;

  • Sorting on date (date_popup2) in manual tabular form does not work

    Hi All,
    I created a manual tabular form (based on a collection) with 1 date_popup2 field in it. This field is defined in the query as follows:
    ,      apex_item.date_popup2( p_idx                   => 18
                                , p_value                 => c004
                                , p_date_format           => 'dd-mm-yyyy'
                                , p_item_id               => 'f18_' || lpad (rownum, 4, '0')
                                , p_item_label            => 'Start date'
                                ) as tf_br_start_date
    In the report attributes I marked this column to be sortable.
    However, in the page the sorting is not working. It looks like it's always sorted in the order  of the seq_id.
    Can anyone tell me how to solve this?
    Regards,
    René

    I'd call it a bug/missing feature.
    It appears that within a Basic report, sorting on a column created using APEX_ITEM.DATE_POPUP2() does not sort by date.
    I'd file this with Oracle Support and see what they say.
    Include a link to this thread and your workspace login information.
    I got something to work by: (probably not what you want.)
    using the C004 column directly. (I just added it to the SQL code)
    setting the column's attribute "Display As" to "Date Picker"
    setting the column's attribute "Number /Date Format" to DD-MM-YYYY
    I suspect: since you don't start with p_idx => 1, this column becomes "1" ==> g_f01
    MK

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

  • 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

  • Manual Tabular Form Formatting Questions

    Hello, this is my first time using a tabular form and am now trying to tackle creating a manual tabular form. So, now I have some questions on formatting.
    1. Is it proper on this forum to lump several similar questions together or should these be separate postings?
    2. I have a hidden column that I do not want to display on the screen at all. However, I need access to the column later when saving. I am currently using the htmldb_item.hidden function to retrieve the field. This works. However, the column still displays but the value does not display. I then tried to uncheck the show attribute for the column to unchecked. Unfortunately, if this is not selected, when using the htmldb_application.g_f01 function, I would receive an error as if the column did not exist. How do I make the column totally hidden so that it does not display at all?
    3. I have a number column where I want the column to display in dollars (i.e. $100, 000). I tried to set the number format on the column in the report attributes. However, no luck. To retrieve the column, I am using the function htmldb_item.text to retrieve the column. I am not sure if I should be able to format the column in the report attributes or if the htmldb_item.text function has a parameter that I could use for formatting. Suggestions?
    4. Similarily, I would like to right justify this column. How is this accomplished?
    Thanks

    Hi everyone,
    Is there any way to not to display the hidden columns in the manual tabular forms,when we create the manual tabular form using htmldb_item.hidden.
    But need to refer that column in the process.
    In the wizard generated tabular form if the column is of type HIDDEN we dont see that column on the report.
    How can i achieve the same in manual tabular forms..
    Thanks

  • Manual tabular form and hidden fields

    Hi,
    I have a manual tabular form with some hidden fields, one for the primary key and one to handle my checkbox.
    The checkbox handling I got from here:
    http://htmldb.oracle.com/pls/otn/f?p=31517:123:4202825883202781:::::
    Here you can see my very simple example:
    http://apex.oracle.com/pls/otn/f?p=22968:3:4142231640027285:::::
    My query:
    select
    to_char(dag,'day dd mon yyyy') dag
    , HTMLDB_ITEM.HIDDEN(1,pk) pk
    , htmldb_item.text(2, ben1) ben1
    , htmldb_item.text(3, ben2) ben2
    , htmldb_item.text(4, ben3) ben3
    , htmldb_item.text(5, ben4) ben4
    , htmldb_item.hidden(6, cb1) cb1_hidd
    , htmldb_item.checkbox(7, ROWNUM, NULL,DECODE (cb1, 'Y', ROWNUM)) cb1
    from dummy
    My problem is that I don't want to show the columns hidden_pk and hidden_cb1. But if I set them to not shown they are not parsed in my html page. Maybe that's all natural but how do I handle this problem??
    Any ideas?
    Regards Daniel

    Stick them to another item, like this
    select
    to_char(dag,'day dd mon yyyy') dag
    , htmldb_item.text(2, ben1) || HTMLDB_ITEM.HIDDEN(1,pk) ben1
    , htmldb_item.text(3, ben2) ben2
    , htmldb_item.text(4, ben3) ben3
    , htmldb_item.text(5, ben4) || htmldb_item.hidden(6, cb1) ben4
    , htmldb_item.checkbox(7, ROWNUM, NULL,DECODE (cb1,
    'Y', ROWNUM)) cb1
    from dummy

Maybe you are looking for

  • Skype on Mac OS X 10.5.8

    Hi! Struggling to get Skype working again on MAC OS X 10.5.8 I repasted into the Info.plist but now I have lost video. Which version will solve all bugs?

  • 2 days old ipad2 keeps on rebooting

    i bought an ipad2 two days ago at first it was working accurately and after i drained the factory charge i plugged it in and start charging.... after 4 hours it was almost half full (44%)... and after another hour it was still 44%... so what i did is

  • System prefs .mac trouble

    Kind of wierd.... When I open system prefs and click on the .mac area. My name is right but the password is wrong. When I change the password and hit enter it changes to the correct amount of dots hiding the password. However if I click on advanced o

  • How do I copy and paste a downloaded resume into/onto a job application in a potential employers website?

    How do I copy and paste a resume from my downloads into/onto a job application on a potential employer's website?

  • Options Upgrade 8.1.7.2 to 11g R1

    Hi, I would appreciate some advice on upgrade path for 8.1.7.2 to 11g R1. The current 8.1.7.2 is running AIX v4.3.3 and we plan to run 11gR1 on AIX v5.3. Our database is currently at 80GB or so for datafiles but the additional on top of this brings i