Adding a Record in Tabular Form

I created a tabular report using apex_collections. Now I have created by apex_collection.add_member . It is successfully adding a new record. But I need to jump off to the last screen to view the blank record.
Any solution to display that in the current page or jump off to the last page when the "Add Record" button is clicked.
Thanks
Deb

Hi,
Your newly added row is going to the bottom possibly because you have given 'ORDER BY SEQ_ID' in your region query. The ADD_MEMBER apeends, so the new row goes to the bottom.
You have to make the new row appear on top. The options are
Option 1:
Use the apex_collection.MOVE_MEMBER_UP and MOVE_MEMBER_DOWN API to take new member to SEQ_ID = 1
You can perform this resequencing in a process that is conditionally executed in Add Rows.
Option 2:
Add a sorting column to your query
select .......from ......where....
order by decode(<pk_col>,null,0,1), to_number(seq_id)
order by Of course, if you change the Order By clause then you will need to make identical change in Validations , Computatiosn and Processes where you are working on the Collection.
Regards,

Similar Messages

  • Sending emails for each record from tabular form

    I currently have a requirements management tabular form that used to update or set job requirements inactive and/or covered.
    We're a staffing agency and have salesmen across the country that will use this tabular form to quickly manage their requirements to mark them as covered or inactive if the position has been filled.
    The multi-row update works fine since the form was built using the wizard, but I need to be able to send out an email for each record that's been marked as covered in the tabular form.
    How can this be accomplished?
    I'm running Oracle 12c and Apex 4.2.0 on a windows 2008 R2 server.
    Thanks again.

    Greg,
    I took a different approach from what I originally suggested.  Since the tabular form is displaying only reqs that eligible to be covered, I chose to construct a process that would read the database after the reqs table was updated.  The code should find recent reqs covered by the salesman and then send out an email for each covered req.
    Since I cannot see the data structure of your reqs table, I guessed the data type and size for the local variables in the DECLARE section, you many need to adjust these.
    Give this code a shot and let's see where we get.  By the way, the naming conventions of your database are in need of naming standards.
    The process needs to occur After Submit and after the Automatic Row Processing (DML) process that is updating the reqs table.  Make sure that the process sequence number is greater than the Automatic Row Processing (DML) sequence number.
    DECLARE
       l_id           NUMBER;
       l_index        NUMBER;
       l_vc_arr2      apex_application_global.vc_arr2;
       lc_message     VARCHAR2 (4000);
       l_pkey         NUMBER;
       l_date_wrote   DATE;
       l_sales        VARCHAR2 (100);
       l_client       VARCHAR2 (100);
       l_job          VARCHAR2 (100);
       l_1or2         VARCHAR2 (100);
       l_rate         NUMBER;
       l_notes        VARCHAR2 (4000);
    BEGIN
       FOR c1
          -- Retrieve reqs primary key that have been covered
          -- in the last 2 seconds by the salesman
       IN (SELECT pkey
             INTO l_pkey
             FROM reqs
            WHERE     SYSDATE < (date_wrote + 1 / 46200)
                  AND active = 'Active'
                  AND reqs.sales = :p12_sales
                  AND covered IS NOT NULL)
       -- Send an email for each req that has been covered
       LOOP
          SELECT c1.date_wrote,
                 c1.sales,
                 c1.client,
                 c1.job,
                 c1.notes,
                 c1.who,
                 c1.1or2,
                 c1.rate
            INTO l_date_wrote,
                 l_sales,
                 l_client,
                 l_job,
                 l_notes,
                 l_who,
                 l_1or2,
                 l_rate
            FROM reqs
           WHERE pkey = l_pkey;
          lc_message := 'Date Written   :' || l_date_wrote || CHR (10);
          lc_message := lc_message || 'Sales          :' || l_sales || CHR (10);
          lc_message := lc_message || 'Client         :' || l_client || CHR (10);
          lc_message := lc_message || 'Position       :' || l_job || CHR (10);
          lc_message := lc_message || '#1 or #2       :' || l_1or2 || CHR (10);
          lc_message := lc_message || 'Rate           :' || l_rate || CHR (10);
          lc_message := lc_message || 'Notes      :' || l_notes || CHR (10);
          l_id :=
             apex_mail.send (
                p_to     => '[email protected]',
                p_from   => 'DO_NOT_REPLY@REQS',
                p_subj   =>    ''
                            || l_who
                            || ' Has Covered '
                            || l_job
                            || ' at '
                            || l_client
                            || CHR (10),
                p_body   => lc_message);
          COMMIT;
          apex_mail.push_queue ();
       END LOOP;
    END;
    Jeff

  • Problem in populating next record in Tabular Form

    on my Tabular form i have fields like :
    VOY_REF, VISIT_NUM, FM_PORT_CODE, TO_PORT_CODE
    when the user enter the visit number 2 i wanted to populate TO_PORT_CODE as 2nd visit's FM_PORT_CODE.
    my code is working fine when every visit been saved before entering the next visit.
    is there any way out without saving every row the user can enter all the visits and commit_form at the end?
    WHEN-VALIDATE-ITEM Trigger
    IF :TT_VOY_SCHEDULE.VISIT_NUM > 1 THEN
         DECLARE
              FMPORT VARCHAR2(5);
              CURSOR C1 IS
                  SELECT TO_PORT_CODE
                     FROM TT_VOY_SCHEDULE
                     WHERE VISIT_NUM = :TT_VOY_SCHEDULE.VISIT_NUM - 1
                     AND VOY_REF   = :TT_VOY_SCHEDULE.VOY_REF;
         BEGIN
              OPEN C1;
              FETCH C1 INTO FMPORT;
              :TT_VOY_SCHEDULE.FM_PORT_CODE := FMPORT;
              CLOSE C1;
         END;
    END IF;

    basically i'm directly calling the TO_PORT_CODE value from the table TT_VOY_SCHEDULE. after commiting the Form only the data gets saved in the table. so when i call TO_PORT_CODE from the table it gives wrong detail.
    that why once i enter a row i save the data so the table get updated. then i enter the 2nd line the information populate correct.
    on your code you mean to say that i don't need to use cursor?

  • Trouble adding rows to a tabular form

    I am recieving below screen error in tabular form when I try to add a row to it :
    Invalid set of rows requested, the source data of the report has been modified.
    reset pagination
    The table contains over 17000 rows in it.

    Bump. I'm having the same issue. Any answers out there???

  • Button tabular form strange behaviour

    Hello everibody.
    Working with Oracle 10G Forms & Database.
    I have a tabular form. In this I have some buttons added to every row of tabular.
    I use a Access Key to can execute any of those buttons.
    The problem.
    If I use the Access Key the trigger fired ever use the data of 1º record in tabular form, maybe Im situate in 5º record if I use access key the trigger take the data of 1º record. If I clik ,whith mouse on the button it take the properly record data.
    Any idea wellcome.
    Thanks in advanced to all.

    Access-Keys will not work properly in a tabular form. The access-key should be unique to the form, if there is more than one time the same access-key, the first one fires, and in a multirecord-block the first one is the first record.

  • Enable/Disable item Based Value from Select in Tabular Form

    Hi Guys
    I want to Disable text field in Tabular form, Based on the Select List Item Value.
    Let's Say
    I'm having one select lista and text box in each record in tabular form.
    Select List having 2 items ... Add Text(return value 1) and No Text(return value 2)
    if value =1 then i want to enable text box , so user can enter value.
    if value=2 then text box won't allow to add text or will become disalbe.
    Please Help
    Thanks

    Hi,
    You can do this by using a small java script
    <script language="JavaScript" type="text/javascript">
    <!--
    function FldEnableDisable(pThis)
    if (pThis == 50)
      $x('P2_TEXT').disabled=true;}
    else
    { $x('P2_TEXT').disabled=false; }
    //-->
    </script>Here P2_Text is the text box whose value I am enabling or disabling based on the selected value from a List box. On The list box I have onChange="javascript:FldEnableDisable(this.value)" ( You can specify this under HTML Form Element Attributes)
    Thanks,
    Manish Jha

  • Tabular Form - Setting a default value just on first row.

    Hi all,
    how to set a tabular form default value only in the first row?
    When I click on "add row" I want the new row have a blank value.
    Thanks in advance.

    Hi,
    When you add a new row to the tabular form, any existing rows should be saved to the database. You can, therefore, check for the existence of such records and set the value of a hidden page item accordingly. The default value for a tabular form item can then be based on this hidden item.
    This can be done by setting the Source Used to "Always, ..." on the hidden item called, say, P1_DEPTNO_DEFAULT, and the Source to something like:
    DECLARE
    X NUMBER;
    BEGIN
    SELECT COUNT(*) INTO X FROM EMP WHERE DEPTNO = :P1_DEPTNO;
    IF X > 0 THEN
      RETURN '';
    ELSE
      RETURN :P1_DEPTNO;
    END IF;
    END;This is a "PL/SQL Function Body" Source Type.
    In this example, we are checking if there are any EMP records with a DEPTNO value that matches P1_DEPTNO. If there are, then the tabular form must contain at least one row already, so we return an empty string. If there are no records, the tabular form must be empty, so we return the P1_DEPTNO value.
    The Default settings on the DEPTNO column in the tabular form would then be:
    Default Type: Item (application or page item name)
    Default: P1_DEPTNO_DEFAULT
    Andy

  • Dynamic LOV FOR TABULAR FORM 6i

    Hi,
    I have tabular form of two Items(ID,DESC) and I want to Populate LOV for item(ID) every record
    and record_Group & SQL statments are stored in DB.
    ACTION: when query in POST-QUERY Trigger get for every record in tabular form -- the stored SQL-Statment from table then put it into dynamic record_group and populate the dynamic LOV.
    Please advice,
    Thanks in Advance.

    OK daniel
    This form used for get reports
    then header get the name of Report (Table-A) (report_ID),(report_desc).
    then details for get the Parameters will send to report builder (Table-B) (detail_id),(report_id),(sql_stm).
    so parameters may be need for example stock code so this record need to query from stocks table to get stock code and stock name.
    next record for item Code so need to query from Items table to get the Item code and Item name
    another report for employees so the user enter report code then when query and get in details block employee code and employee name.
    so the lov will check if this record have query sql-statment or not if have execute it in the record_group then in lov
    then go to the next record if sql_stm is null then no lov in this record and so on.
    thanks..

  • Displaying all the records in a tabular form on a single page

    Hello,
    After setting up a data entry page, I have hit an unexpected problem.
    The logic in my page requires that all the records in my tabular form should be displayed .
    The tabular form is based on a collection, and the user selects rows through a checkbox.
    Any reload of the page due to pagination will break the logic, as some calculation and display events occur during page load,
    based on the previous page.
    I need to display about 25 rows.
    I have changed the report attribute to display 50 rows, but it displays rows only up to the bottom of the screen,
    i.e. 11 rows.
    Unfortunately I only just added some new rows and saw this behaviour else I would not have gone that way,
    as I expected APEX to display all rows if required.
    Some help will be much appreciated.
    Regards
    Leckraj

    leckj wrote:
    Hello,
    After setting up a data entry page, I have hit an unexpected problem.
    The logic in my page requires that all the records in my tabular form should be displayed .
    The tabular form is based on a collection, and the user selects rows through a checkbox.
    Any reload of the page due to pagination will break the logic, as some calculation and display events occur during page load,
    based on the previous page.
    I need to display about 25 rows.
    I have changed the report attribute to display 50 rows, but it displays rows only up to the bottom of the screen,
    i.e. 11 rows.
    Unfortunately I only just added some new rows and saw this behaviour else I would not have gone that way,
    as I expected APEX to display all rows if required.Pagination settings are cached for the duration of the session. For this change to be instantly visible, either log out, restart the brower, and log in again, or manually re-request the page from the browser address bar, adding 'RP' in the ClearCache position in the URL.

  • Adding a button to each row of a tabular form

    Hi,
    I'm new to APEX. I've searched the forums high and low for a couple days, but no go on a solution to my problem. Perhaps I'm not phrasing my search right.
    I have a tabular form. The columns in each row save to a table called STORE. At the end of each row, I'd like to have a button/hyperlink that takes you to another page wherein, for that store, you can check/uncheck the items they carry. So, here's the main tabular form:
    The Hardware Shop -- Col1 Col2 Col3 Col4 Col5 Link
    Bob's Nuts and Bolts -- Col1 Col2 Col3 Col4 Col5 Link
    Suppose you click on the link for The HW Shop. Now you're in a screen where you have a list of 20 items (coming from another table). From that list, you can check/uncheck the items carried by that store, save changes, and return to the tabular form. Checking/unchecking would insert/delete records from a junction table (using a trigger I guess).
    Back in the tabular form, you should still be able to save data at that level (i.e. the col1, col2, etc., above). I have this latter part working, and I know how to write triggers, it's just the button link concept that I can't understand.
    I'd be much obliged if somebody could point me to some sort of reference/example.
    Thanks,
    Max

    Hi again,
    I'd like to add some functionality to this, and would appreciate any input. I can't post this app for security reasons, and it would require a lot of reworking to 'genericize' it, so I'll just devote that same energy to being as detailed as possible in my explanation of the issue.
    Part of my app has 2 pages that interact with each other. Page 1 is a tabular form, and at the end of each row there is a link column, which I created with Arie's help. This link opens up page 2, which is also a tabular form.
    Clicking 'Save' in page 2 should launch a javascript function to do some calculation, and then this calculation should be sent back to page 1, and stored in a text field located on the same row as the link column that was clicked in page 1.
    There's a lot of different ideas floating in the forums regarding javascript calls via buttons, and I'm currently researching that. More important to me is understanding what row number was clicked on page 1 (i.e. f01, f02, etc.).
    I think this posting is similar to what I'm trying to do: Re: Trying to attach onclick event to a pagination link But, the replies went a bit over my head. I managed to create a row selector, which added a checkbox column to my form. But the downside to that is I don't want to force the user to click a checkbox to activate a row, and then do the additional step of clicking the link column.
    Thanks,
    max

  • Forms need to get next record value in  tabular forms, update # on delete

    the isusue
    In a tabular form (multirecord)...when i enter + to add the first record , it should add 1 in this item 'order' and if i hit + again then it should enter 2 and so on....
    where users would enter different records at once and save it .However if they were to delete a record in the middle ...
    say record
    1
    2
    3
    4
    5
    6
    and delete 2 and 3 then # 4 should be 2 and # 5 should be 3 and #6 would be 4 . if they are to add a new record then it should assign the next number which would be 5
    what i have done is created a non database item in that block and made it a summary field with max
    and in the when_new__record_instance trigger...i am doing somthing like
    If block.item is NULL
    THEN
    block.item = block.non_database_item +1
    end if
    got this from a post here by Francois...
    it is adding just 1 everytime i hit + to add a new record...when the item is null in the beginning. However if i save the first record then click + to add new record then it goes inseries like 2..3..4....
    Any help would be appreicated . Thanks

    HI,
    Check following thread you may useful
    Maximum create call for the VO

  • How to make the Tabular Form for Inserting records only?

    Hello Experts
    I need to create a Tabular form page to use it to insert records only. I do not want to update or delete records. I want the user to fill some fields and then validate it and submit. Also, I need to add a field that shows the sum of a specific field of the added records.
    Thanks a lot for all your help.

    UPDATE_LTD
    For Maintain subset of data (Update selected data)
    SHOW_LTD
    Display subset (Display Selected Data)
    TVIMV-VARIANT
    Variant name. Use variant (only with UPDATE_LTD, SHOW_LTD and TRANSP_LTD)
    For more information refer the below link
    [Maintain parameter transaction code|http://help.sap.com/saphelp_webas630/helpdata/en/a7/5134f9407a11d1893b0000e8323c4f/content.htm]
    Hope this helps.
    Thanks.,
    Balaji

  • How to save all records in the Tabular form page temoprarily

    Hi All,
    I am very new for HTML DB. I created 5 tabular form using HTML DB Wizard. I want that whenever I open any tabular form page and click the add row button in that page then I should add as many record as we need but it should not save in the database but want to save all the page record temporarily in the page. When save button should click then it should save in the database. Can anyone suggest how to do in stepwise. It will be a great help for me.
    Thanks.
    Amit

    Hi,
    Anyone, can help me with this scenario.
    Brgds,
    Mini

  • Processing mutliple records on multiple pages in a tabular form

    I'm a newbie to Apex (4.0). I have a tabular form displaying 500 rows records in multiple pages. The row selector is selected by defaulted ie. all rows have been checked. Upon unselecting items in multiple page, the Multi Row Delete (Post Processing Request) only deletes the records selected on the page. It seems like the ROW SELECTOR does not keep track of the checkboxes on other pages. Any thoughts on how to solve this would be helpful.
    Thank you.
    Ed.

    Sybrand,
    Thanks for the response. So in that case, how would I approach the following requirement:
    Tabular form that displays 500 records each in multiple pages. The Row Selector column is selected by default. The user will uncheck certain rows in certain pages. I would like to perform a Multi Row Delete for alll the records that were selected.
    Thanks,
    Ed.

  • Create tabular form with blank records

    Hi,
    I want to create a tabular form for INSERTing multiple records! However, I am having difficulty working out how to render the form as 'empty' i.e. no existing table records appear on the Form. I tried to adjust the query the form is based on so the 'automatic' query returns no records, but this caused the fields to 'disappear'. Can anyone recommend the best way to do this (if possible),
    regards,
    Kevin.

    Hi Tyson,
    I used the Advanced Dynamic Action wizard and at the point when I specify the Page Load event, a drop down list of conditions is available ( but does include NOT EXISTS ) so I kept the default 'No condition'. I associated the DA with the Event Source. Without editing the DA the form shown 10 blank rows in addition to 10 rows populated from the table. On subsequently editing the DA to add the NOT EXISTS condition you mentioned, the additional blank rows did not appear.
    I had exactly the same behaviour when associating the DA with the 'Form' Region! Is the bottom line simply that I can't have a totally blank form if the table it is based on is not empty?
    regards,
    Kevin.

Maybe you are looking for