Oracle Forms - need to update multi-record block - Help needed asap

Hi,
We are using Oracle apps release 11i - Oracle forms 6i.
I have a field "project_start_date" in project_block in a custom form. There is another multi-record block called role_block in the same custom form and it has a field named start_date. Requirement is when ever I make change in the project_start_date in project_block, that should reflect in role_block.start_date. I tried different means and could update only the very first record of the multi-record block - role_block. I need to update all the records in the role_block with the same project_start_date. Used looping and several other methods. But could not achieve. Any help is really appreciated.
Thanks
Akil

Hi;
For your issue i suggest close your thread here as changing thread status to answered and move it to Forum Home » Application Development in PL/SQL » Forms which you can get more quick response
Regard
Helios

Similar Messages

  • Saving the record in multi-record block while updating

    Hi gurus
    I have a table name PT . Its is master table where PT_TYPE IS unique
    desc PT
    PT_TYPE VARCHAR2(2) unique,
    PT_CODE VARCHAR2(4),This is the detail table on which the form is being designed is meant for insert/update/delete.Insert and delete are working fine.
    desc PST
    PST_PT_type varchar2(2) unique,
    PST_A_code Varchar2(3) unique,
    PST_A_desc varchar2(10) The form layout is a multi-record form as below and based on PST table with PT_CODE as non-base table item & PST_PT_TYPE
    not displayed but its there in the block.
    FORM_LAYOUT
    PT_CODE PST_A_CODE PST_A_DESC
    ASD          AS          TESTAS
    ASD          AD TESTAD
    ASD DS TESTDS.
    Now the problem is when I am querying record through enter-query mode (say by entering PT_CODE 'ASD') and
    change one of the base table items(PST_A_CODE or PST_A_DESC) values and commit it. its says '1 records applied and save'
    but when I change ONE OF THE PT_CODE(non-base table item) values it says 3 records applied and saved. as the 3 records
    are currently displayed when querying

    Hi Craig,
    Both below program unit is in the WHEN-VALIDATE-ITEM of NBT item PT_CODE
    --this is to check that valid pt_code is entered
    PROCEDURE val_pt_code IS
         cursor val_cur is
         select pt_code
         from pt
         where pt_code =:pst.pt_code;
    v_dummy varchar2(12);
    BEGIN
    open val_cur;
    fetch val_cur into v_dummy;
    if val_cur%notfound then
    close val_cur;     
         warn_alert('Error:The Product Code entered does not exists');
         raise form_trigger_failure;
    end if;
    close val_cur;
    END;
    --this is to check that particular pt_type value is for the pt_code is selected
    PROCEDURE get_pt_type IS
         v_pt_type varchar2(2);
    begin
         select pt_type into v_pt_type
         from      pt
         where pt_code = :pst.pt_code;
         :pst.pt_type := v_pt_type;
    exception
         when no_data_found then
              warn_alert('Error:The Syllabus Type does not exists');
         raise form_trigger_failure;
    end;
    --

  • Querying a multi-record block within my form

    I have a form where I perform validations of items entered on my main block. I compare the item value entered to an expected value and if they are different then an exception record must be created in a separate, multi-record block within my application. One record on my main block may end up with multiple different exception records in the multi-record block. As a result, part of my validation must include determining whether the user has already created an exception record for the item that I'm validating in the multi-record block.
    Is there a way for me to query and uncomitted, multi-record block in my form? Help would be greatly appreciated!

    Andreas' method is good.
    Only several changes:
      LOOP... EXIT WHEN :SYSTEM.RECORD_STATUS='NEW';
    (Use NEW, not TRUE)
    And just before the Raise Form_Trigger_Failure, I would Go_Item to either the item in error, or to a new line in the exceptions block. And also issue an error message.
    ....By the way...
    If your exceptions block has more rows than will fit on the screen, then your search loop function will may cause the rows to jump up or down when the user tries to commit. There is a way to reset the view after the function completes its search -- you just need to store the value of the block's Top_Record property before the First_Record command, and then Go_Record(Top_Rec_value); after the function completes its loop.
    Also, there is a way to prompt the user to enter the exception record when you first validate the item in a when-validate-item trigger. But the user might ignore the prompt, so you still need to re-check everything from the key-commit process. To use the WVI prompting, in the WVI trigger you check if an exception is required. If it is, store the item name in a package variable, then start a non-repeating timer. When the timer expires, save the :System.cursor_item value (so you can go_item back to it after calling the function), and then call the function to check for the exception for the item named in the package variable. If not found, prompt the user. If found, go_item back to the cursor_item_value.

  • Updating a value of a text item in a multi record block based on a change

    Hi,
    I need to change the value of a text item in a multi record block based on a change to another item's value in the same block.
    Suppose there's a text item in a multi record block called dt1 which is of type date, which is changed in a particular record. I want to change the values of the another item in the same multi record block, for all other records by running a loop through all the records in multi record block. I dont want to do it on the press of a button, it should do automatically on change. Help me resolve this issue.

    Hi,
    I need to change the value of a text item in a multi record block based on a change to another item's value in the same block.
    Suppose there's a text item in a multi record block called dt1 which is of type date, which is changed in a particular record. I want to change the values of the another item in the same multi record block, for all other records by running a loop through all the records in multi record block. I dont want to do it on the press of a button, it should do automatically on change. Help me resolve this issue.

  • No base table multi record block...updation

    hello all,
    i have a multi record block with two fields order & datetime to capture the time of the order. but this block is not based on any table. and i want to update another table with the datetime based on the order captured.
    how to do that...? there may be n number of records coming into the block at a time.
    thx in adv.
    Kris

    the best way is make it as a database block .and palace your insert statement in pre-insert trigger when you are inserting the record and place your update trigger in pre-update trigger u can also place your insert and update statement in back end, "i prefer the backend triggers").I think this is the best way because if you are using the go_block and next_record, that may take lots of time time to traverse record by record.
    regards
    mathew

  • Web Form Hangs When Scrolling through Multi-Record Block

    Hello!
    I have a web-deployed form that uses the Sun Java JVM and utilizes WebUtil.
    We are using JDK v1.4.2.
    When I open this form using the Java plug-in and try to scroll through a multi-record block ... it will hang at various points and eventually I have to close the form because it won't respond.
    This does not happen if I simply access the form through the Microsoft JVM.
    Any suggestions?

    That's a know solved bug. You must install AS10g patchset 9.0.4.2.
    For me it solved the problem.
    Bug 3557904: Forms hangs (deadlocks) when scrolling on XP under some circumstances
    Joao Oliveira

  • How to do it in multi-record block

    Hi all,
    i have 1 text items in a multi-record block number of record displayed 10
    and i have values like 100 , 50, 30 in first 3 records and in 5th record i want to put some value like
    20 then i want to calculate all values like 100 + 50 + 30 +20 = 200 and i want to put the total value in a single record block.
    but my problem is i cannot able to calculate all the value because for the totale value i have to
    write a for loop to loop through the record
    but go_block() is not working in post_change .
    if any solution is there plz suggest.......

    Hi zeeshan
    my problem is i cannot able to calculate all the value because for the total value
    put the total value in a single record block.
    First pls the following...
    Guidelines for Working with Calculated Items Calculated items_
    1- They are display-only control items.
    2-Calculated items cannot be database items.
    3.While you can set a calculated item's Enabled, Mouse Navigate, and Keyboard Navigable properties to Yes,
    you cannot set the Insert Allowed or Update Allowed properties to Yes
    Second Keyword: TOTAL is a reserved oracle key word... pls read the Details...
    go_block() is not working in post_change .well u can use timers but no need for it u can reference block item but first u have to accumulate the values per record in WHEN-VALIDATE-ITEM TRIGGER in the last calculated item which is inserted by the user and assign it to the display item in ur current multi-record block :*block_name.total_item*.. as follow...
    :block_name.total_item := :item1 + .... ; Then u create a second display item > no of records property = 1 , named e.g. final_summarized_totals
    In order to summarize this total values accumulated in the multi-record display item named e.g. block_name.total_item
    Finally using PRE-INSERT , PRE-UPDATE,PRE-DELETE Triggers to assign the value calculated into the display item * block_name.total_item* into the db_item into the previously mentioned Trigger Block-Level Off-course.
    :block_name.total_db_tem := :i:block_name.final_summarized_totals ; Hope this helps...
    Regards,
    Amatu Allah

  • Check box in a multi record block

    I have a multi record block that has a check box. I need to be able to go to the first record on the block, go through each row and check to see if it's selected. I will then get all the rows that were selected and passed it as a parameter in a package.I have already declared a global variable in the package to get all the rows selected.
    Can anyone please help.

    Hi
    This is my solution for your problem. If I understand correctly as you have to post the selected records from form to journal entry (a server operation). What you need to do is in your Oracle Forms multi record block construct a loop which goes from first record to last record of your data block, capture the selected records (wherever the check box is CHECKED ON) into a PL/SQL table structure (PL/SQL table is quite simillar to Oracle Forms RECORD GROUP structure, but more versatile as it can be recognized on the back end too).
    Once you populate the PL/SQL table with the selected record, pass the PL/SQL table itself as parameter to your package.
    Open the PL/SQL table in your destination code and do further processing with those selected records !!
    Hope this will work !!
    MOHAMMED R.QURASHI
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by kay:
    I CANNOT USE A RECORD GROUP. I HAVE TO EVENTUALLY POST THE SELECTED ROWS INTO JOURNAL ENTRIES. I STILL NEED TO BE ABLE TO
    GET ALL THE ROWS SELECTED BY THE USER.CAN I USE A CURSOR IN THE FORM TO GET ALL THE ROWS
    SELECTED?.
    THANKS FOR THE REPLY GANESAN.<HR></BLOCKQUOTE>
    null

  • Multi Record Block Problem

    Hi,
    I have a multi record block with two fields NAME and DATE. On clicking the Save Button a procedure (PROC_BEFORE_SAVE) is called which loops through this block, and deletes empty records.
    PROC_BEFORE_SAVE
    LOOP
         IF :TI_NAME IS NULL THEN
              DELETE_RECORD;
         END IF;
         NEXT_RECORD;
         EXIT WHEN :SYSTEM.LAST_RECORD = 'TRUE';
    END LOOP;
    The proc fails and throws error (Oracle Error Unable to Update Records) only for the case that the first few records are null. Sample data given below.
    Name  -  Date
    NULL  -  NULL
    NULL  -  NULL
    NULL  -  NULL
    AJ  -  10/02/2005
    JA  -  12/12/2004
    AJV  -  12/12/2002
    This happens because it tries to update the NOT NULL field NAME as NULL.
    Could somebody please tell me why this is happening? Is there something wrong with the procedure?
    I am using Oracle Forms 6.0.8.8.0 in Windows 2000 Professional edition.
    Any help would be greatly appreciated.
    Thanks,
    Anoop

    Hi,
    Thanks for the reply. But CLEAR_RECORD also doesn't seem to work.
    Thanks,
    Anoop

  • Moving cursor on  multi-record block with pjc components

    Hi, this thread question is updated to a more specific and correct one in the new thread:
    Need help on using navigation function in when-custom-item-event trigger
    Please, follow there...
    I have a pjc on a multi-record block. When I activate the pjc the forms cursor does not navigate to the item.
    The when-custom-item-event is activated. My question is how do I move the cursor to the current record?
    Best regards,
    Constantin
    Edited by: ConstGl on Jan 11, 2011 5:47 AM

    +"... When I activate the pjc the forms cursor does not navigate to the item..."+
    Sorry, but this is not clear for me.
    Francois

  • Enabling and disabling the button in the multi record block

    hi all,
    i am using
    Forms [32 Bit] Version 6.0.8.24.1 (Production)
    Oracle Database 10g Release 10.2.0.1.0 - Production
    i have a multi record block each block contains a button(button is to approve the record in terms of changing the status)
    i have the items like date,remarks and button
    the button should be enabled if the remarks is not null otherwise it should be disabled.
    for this in pre-record trigger i have written
    if :record is null then
       set_item_property('button',enabled,property_false);
    else
          set_item_property('button',enabled,property_false);
    end if;what problem is enable and disable is impacting on all the buttons in the block. in other words if first record's remarks is null then all the records button is disabled. if first record's remarks column is not null then all the records of the button column is enabled.
    i have to make enable and disable the button for the corresponding record.that means if first record's remarks column is not null then only first records button should be enabled others should be disabled.
    Thanks..

    You need to set the No. of items displayed to 1 as Ammad had said, additionally you can set the X and Y Position (Just Y will do and having fixed X) of the button depending upon the current record.
    can u explain this part alone bit more (setting the position of x and y)You need to calculate the variable Y_POS depending upon the current position of the cursor that is the current record.
    You can find the current record Y_POS using combination of
    V_CURRENT_RECORD := :SYSTEM.CURSOR_RECORD;
    V_TOP_RECORD := GET_BLOCK_PROPERTY ('BLOCK_NAME', TOP_RECORD);
    V_ITEM_Y_POS := GET_ITEM_PROPERTY ('ITEM_NAME', Y_POS);
    -- Also needs to add the Y_POS of the relative other items in the muti-record block
    V_HEIGHT := GET_ITEM_PROPERTY ('BUTTON_NAME', HEIGHT);
    -- Note :- TOP_RECORD  Returns the record number of the topmost visible record in the given block.
    V_Y_POS := V_ITEM_Y_POS + ((V_CURRENT_RECORD - V_TOP_RECORD) * V_HEIGHT);
    -- You will need to add Distance between Items in records if anyThen you can Set the current Y_POS of the button.
    SET_ITEM_PROPERTY ('BUTTON_NAME', Y_POS, V_Y_POS);
    [/code[
    Hope this helps
    Best Regards
    Arif Khadas
    Edited by: Arif Khadas on Feb 24, 2011 4:58 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Is it possible to requery only a single row of a multi record block?

    Hi,
    I have a data block say "Employees". This is a multi record block.
    Requirement: Two users are working on the same form (front end). Now the user1 has made change for EMP1 The same is not reflected in the User2 Session. Hence i need to requery the values updated for EMP1
    Issue: Since there lots of employees listed in this block. i do not want all the employees details to be required (Block requery). Instead is it possible to requery only a perticular record to be required?
    Thanks,
    Vidya

    I think not possible........
    Usually Approach is the data in grid table displays as read only and when user press EDIT button then they can edit one single record in a separate window.
    ooh got one idea.......
    may be create a save point and rollback to that particular save point ....... i hv never tried it but try it might solves your problem
    there is a feature of Clear_form rollback to save point
    PROCEDURE CLEAR_FORM
      (commit_mode    NUMBER,
       rollback_mode  NUMBER);
    Parameters
    If the end user has made changes to records in the current form or any called form, and those records have not been posted or committed, Form Builder processes the records, following the directions indicated by the argument supplied for the following parameter:
    commit_mode     ASK_COMMIT  Form Builder prompts the end user to commit the changes during CLEAR_FORM processing.
    DO_COMMIT  Form Builder validates the changes, performs a commit, and flushes the current form without prompting the end user.
    NO_COMMIT  Form Builder validates the changes and flushes the current form without performing a commit or prompting the end user.
    NO_VALIDATE  Form Builder flushes the current form without validating the changes, committing the changes, or prompting the end user.
    rollback_mode     TO_SAVEPOINT  Form Builder rolls back all uncommitted changes (including posted changes) to the current form's savepoint.
    FULL_ROLLBACK  Form Builder rolls back all uncommitted changes (including posted changes) which were made during the current Runform session.  You cannot specify a FULL_ROLLBACK from a form that is running in post-only mode.  (Post-only mode can occur when your form issues a call to another form while unposted records exist in the calling form.  To prevent losing the locks issued by the calling form, Form Builder prevents any commit processing in the called form.) Edited by: BaiG on Apr 12, 2010 3:49 PM

  • In an Multi Record Block last previous record should be end dated

    Hi all,
    can any one help me in this,.....
    i a multi record block i need to end date the last previous record,..
    Thanks
    Raj

    Raj,
    My guess is that you would want the previous record end-dated even if the user uses a Hot-Key to save the record in addition to using the SAVE button. That being the case, I would add or alter the Pre-Insert trigger on the block to update the find the record that does not have an end-date and update the end_date to SYSDATE. This assumes that there will always only be one record that needs to be end dated. If there are more than one, each record will have the end_date updated. Using your data, you can accomplish this a couple of ways. The first would be to simply update the base table using a simple update statement in an Anonymous Block in the Pre-Insert trigger:
    BEGIN
       UPDATE verify_table
          SET enddate = sysdate
        WHERE enddate is null;
    END;Second, you could loop through the block in the Form and update any records where the enddate is null.
    BEGIN
       GO_ITEM('MYBLOCK.FIRST_ITEM');
       FIRST_RECORD;
       WHILE :system.last_record = 'FALSE' LOOP
           IF :myblock.enddate is null THEN
              enddate := sysdate;
              EXIT;
           ELSE
              NEXT_RECORD;
           END IF;
       END;
    END;Hope this helps.
    Craig...
    -- If my response or the response of another is helpful or answers your question please mark the response accordingly. Thanks!

  • Get the first item value of previous record in a multi record block

    Hai,
    I have a multi record block with four items.I should get the first item value of the previous record so that I can increment its value in the current record.
    Thanks.........

    If you want a distinct value in each row or to be able to retrieve the records in the same order they were written then you should use a sequence.
    If you want to retrieve the records in the same order they were created in the block then you will need a diffferent solution to the one you outline here since a user could enter a new record between two others.
    I posted this a while back in response to someone who was using a sort_key item and resetting it for each row when a new record was inserted:
    If you make the sort_key bigger then you have much more room to insert new rows in between existing rows without having to reset all the sort_keys.
    Eg. you have rows with sort_keys of 129282000000000000 and 129283000000000000 (you can have more zeros if you want) and you want to insert a row in between. if you're using oracle forms then the user would have to click on the first of these rows and then do 'insert'. in your insert process you would store the sort keys of the current record and the one below, create a blank record in between and set the sort_key of that record to the average of the other two. you will be able to insert many new rows in between the original 2 before running out of space in the sort_key field.
    the method above is not sufficient, there are some other cases to consider:
    1) when the user is on the last record of the block then you will just create a new record with sort_key set to a greater number than the row before. you can have the sort_key defined as number(38) and to safely allow you to enter 1000 rows each new row would normally be 10E33 greater than the previous one.
    2) when the user is entering the first record then just set the sort_key to 10E33.
    3) on the off-chance that you do insert a great number of records and cannot insert another in between then you would need to alert the user, process the records so that the sort_keys are evenly spaced and requery the block. this processing could be scheduled nightly to make this eventuality even less likely.
    4) make sure the user cannot run the default 'clear_record' procedure. this would break my method as well as yours!
    James.

  • How to do validation on multi record block at run time...

    Dear Friends,
    I have to do validation at run time on multi record block.
    If user tries to enter and save two or more records in same multi record block with same data at run time, it should not allow it and display a message like, " error : Records are having same(duplicate) values. "
    I already did validation with the data coming from database table using cursor. But confused about how to do at run time(on one screen only) ??
    Please, give details about how to check duplicate records on form block before saving it to the table ????
    Regarding details would be greatly helpful.
    thanks,

    Hi...Pankaj
    thanx for your reply..
    I already did validation for the data coming from table....
    but I need to do it on form only...at run time...
    exa...
    In one multi record block
    record no : column 1 : column 2 : column 3
    1 abc 123 hi
    2 abc 123 hi
    so it should check on the form itself, here I m not getting data from table...I am just
    navigating from first record to second using down arrow.
    so, may be 2 possibilities.
    1) when user navigates using tab to third record, it should say like two duplicate records.(may be like when validate record or item)
    2) or when user tries to save, it should say two duplicate records.
    so, everyting should take place on form screen only.....
    waiting for your reply,
    thanx...

Maybe you are looking for

  • Help with dying ipod...!

    hey everyone ive been battling with my ipod for months now and it seems it either needs a new hard drive or is just done with... I just reset the whole thing and thought that would take care of the problem but no it hasnt. basically everytime i turn

  • 802.1x problem

    Need a help 1) We have implementing 802.1x authentication( MAC authentication) for central location,each user need to be authenticate through Laptop/desktop MAC address based on 802.1x. after authenticating user have received IP address from DHCP ser

  • Pulling text from fields based on criteria

    So, I am somewhat new to Adobe LifeCycle designer. I am creating an order form that lists product with some prdouct information. Currently a customer can fill in a quantity under the quantity field and it will auto generate a subtotal and will add th

  • DHCP scope full, event ID 1020

    Hi, one of our Windows 2008 R2 Domain controllers is returning the following warning message on almost a daily basis: Log Name:      System Source:        Microsoft-Windows-DHCP-Server Date:          19/11/2014 11:32:41 AM Event ID:      1020 Task Ca

  • Never seen prob with mail only on iPad

    I am having things show up on my iPad mail account. They say,"No Sender", "No Content", with a date stamp of 12/31/69. There is no " dot " to highlight so I can not delete them and I'm getting about 10-15 per day.