Can update detail record in browse form?

I have a browse form ,it's record do not to create or insert but update,and update only a few column such as change is_disabled to true/false,since then I want change records by click radio group or check box,is this can do?
I use Jdev9.03

955268 wrote:
I have a simple APEX form based on a table with 2 columns with one column being a primary key.
When i create the APEX form based on my table it hides the primary key column. If I make it visible by changing it to a Text item from Hidden.
I am unable to update or insert a new record in the form. It gives me a MRU error.
I would like to know how can i create my APEX form with both the columns updateable and visible.You didn't provide any information about your apex version, so I assume the most current one (Apex. 4.1).
There you can run the form wizard using the ROWID of your table. If you use that, then the PK column can be filled out manually, just as any other item.

Similar Messages

  • Updating detail record and getting multiple 'UNABLE TO INSERT RECORD' msgs

    Help! We have 2 datablocks, master and detail block with relation defined. Master is defined with view based on database joins; detail is view based on table.
    When I update the record in detail block, error message 'UNABLE TO INSERT RECORD' appears four times, then I get transaction complete: 5 records applied and saved, where the one record successfully updates. Why are we getting four records with insert errors and one record update? We don't want to work directly on the table, but why can't we use the view? please help.

    The UNABLE TO INSERT record will be accompanied by more information if you press the Display Error key. Your form commit processing should stop when it gets an error like this, the fact that it doesn't implies that somewhere in your code you are not checking for FORM_SUCCESS before continuing doing something else.
    This sounds quite involved, we would need to have more information about what records are queried and what's being changed on them to cause the commit.

  • How to put detail records in fixed formÉ

    Hi,
    I am trying to build a crystal report based on an existing printed form. The form includes elements that look like the following:
    Activity
    Hot Oiler - 4 mbtu     7mbtu
    Pressure Pumping - 5K   10K   15K
    Travel - 5K   10K   15K
    Standby - 5K   10K   15K
    Each Activity also has a quantity, a rate, and a total (quantity * rate) associated with it.
    The user used to circle the applicable value on the paper form (for example, if it was a 4 mbtu hot oiler vs. a 7 mbtu hot oiler).
    In the application and database the user will enter line items in the work order that specify if it is a Hot Oiler  4 mbtu or a Hot Oiler 7mbtu.  Similarly, the user will create a record that is either Pressure Pumping 5k or Pressure Pumping 10K or Pressure Pumping 15K. And so on.
    The application is capturing all of this information.  I want the crystal report to still display each of these elements as they are laid out on the current paper form however because these are detailed records I do not know how to place them in the report properly. If we take the first line in the form, I created the formula:
    +if {field_tickets_has_resources.resources_id} in [150, 151] then
    "Hot Oiler - " & "4 mbtu" else
    if {field_tickets_has_resources.resources_id} = 163 then
    "Hot Oiler - " & "7 mbtu" else
    "Hot Oiler - "+
    I created another formula for the second line in the form:
    +if {field_tickets_has_resources.resource_roles_id} = 15 then
    "Pressure Pumping - 5K" else
    if {field_tickets_has_resources.resource_roles_id} = 18 then
    "Pressure Pumping - 10K" else
    if {field_tickets_has_resources.resource_roles_id} in [22, 24] then
    "Pressure Pumping - 15K" else
    "Pressure Pumping -"+
    And so on.  However, I cannot place each of these formula beside each other in a details line because it places the values horizontally rather than vertically in the report.  I cannot place these in a header because they are actually detailed records.
    I hope this makes sense. Any help, as always, is appreciated!
    Mark

    Hi Mark, 
    I recommend a similar apporach but the first formula will be created so we can group the records by the Activity type.  For example all the Hot Oilers then Pressure Pumping, etc. 
    We group on this formula then a second formula will build a list of the quantities. 
    One final formula in the Group Footer will display everything on a single line.  We can then hide the Group Header and Detail section because we only want to see one line per actvity type. 
    Create a group on this formula:
    @ActivityGroup
    If {field_tickets_has_resources.resources_id} <> 0 Then
       "Hot Oiler"
    Else If {field_tickets_has_resources.resource_roles_id} <> 0 Then
             "Pressure Pumping";
    This formula will define and reinitialize a string variable for each group.  This goes into the Group Header and can be suppressed. 
    @Initialize        
    WhilePrintingRecords;
    StringVar myQuantity := "";
    This formula goes into the Detail section.  Based on your first formula I'm guessing the Activity Type is based on which field is populated.  I assume only one field per record can have a value that isn't 0. 
    @Quantity        
    WhilePrintingRecords;
    StringVar myQuantity;
    If {field_tickets_has_resources.resources_id} <> 0 Then
       (Select {field_tickets_has_resources.resources_id}
          Case 150  :myQuantity := myQuantity & "4 mbtu "
          Case 151  :myQuantity := myQuantity & "4 mbtu "
          Case 163  :myQuantity := myQuantity & "7 mbtu ";)
    Else If {field_tickets_has_resources.resource_roles_id} <> 0 Then
       (Select {field_tickets_has_resources.resource_roles_id}
          Case 15   :myQuantity := myQuantity & "5K "
          Case 18   :myQuantity := myQuantity & "10 "
          Case 22   :myQuantity := myQuantity & "15K "
          Case 24   :myQuantity := myQuantity & "15K ";)
    This formula goes into the Group Footer and builds your string. 
    @Display     
    WhilePrintingRecords;
    StringVar myQuantity;
    {@ActivityGroup} & "-" & myQuantity;
    All the sections except for the Group Footer can be formatted to hide. 
    Hope this helps,
    Brian

  • How can I display records dynamically in forms?

    Hi Friends,
    I want to display the number of records in the form dynamically. Suppose the back-end table is having only 5 records means it should display 5 records. If any new records is inserted later then it should show 6 records. It should display 10 records at a time with a scroll bar in case if a table is having more records.
    The best example is Data Grid in VB. The same kind of mechanism I want to provide in my form. How can I do that?
    Any suggestion would be greatly appreciated.
    Thank You.
    Gopinath Kona
    null

    Why not have number or records displayed as the number that best fits the space and then if less come back the scrollbar is disabled, and if more come back the scrollbar is enabled?

  • Updating multiple records from single form (ASP)

    I have a nested repeat region.
    I have created in the parent, a form with 3 fields and an update button.
    the child records all have multiple columns, 3 of which correspond to the parent.
    Athe parent is bound to the child records by the shipmentID
    I need to be able to update all child records from the form in the parent.
    The case is this.
    The child records are orders with shipdates and frequencies
    The parent contains a form with fields for shipdate and frequency
    The administrator needs to change the shipdate and/or frequency for all child records.
    (The child records are forms as well--but that's another issue that works fine)
    Shipment ID
    Date Field
    Freq Field
    UPDATE Button
    ShipmentID
    Record 1
    Data case1
    Date
    ShipmentID
    Record 2
    Data case 2
    Date
    I am doing this in classic asp with an SQL database.
    So how do I get the form to update all record
    [Subject title edited by moderator to make clear ASP involved]

    Hi,
    This is one of those questions that would require far more explanation that is reasonable to expect in a forum. You should do a little poking around in the nearest Barnes & Nobles. About a half hour in a chare with a good ASP book and vanilla latte should have you on the right track.
    Lawrence   *Adobe Community Expert*
    www.Cartweaver.com
    Complete Shopping Cart Application for
    Dreamweaver, available in ASP, PHP and CF

  • Copying master detail records in oracle forms

    Hi,
    Have a master details block , using a copy button i copy the existing contents
    in both the blocks , than primary key and foreign key value of the both blocks are changed and i want to save it as a new record.
    Problem is when i do the above it goes to record status as update
    it is not doing insert with the values.and throwing an error wrt referential integrity
    pls help
    with thanks

    This forum focuses on EBS. For Form specific questions, you can try Forms

  • Need to update mutli record in oracle forms - Urgent please

    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

    Please first read this https://forums.oracle.com/forums/ann.jspa?annID=432
    We are using Oracle apps release 11i - Oracle forms 6i.I can't understand this together.
    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
    AkilIs there any relation between project_block and role_block ?
    Do u want to update corresponding column (specific filed) of role_block when updating project_start_date in forms? How may rows will be updated for one project_start_date update ? one or multiple or all ?

  • Updating current record using SET_CUSTOM_PROPERTY in a multi-record form

    Hi,
    I have a multi record form and am using the SET_CUSTOM_PROPERTY method in the when validate trigger of an item. The problem is that it updates all records in the form instead of updating just the current record.
    Any inputs to resolve this would be helpful.
    Thanks

    I cannot reproduce the issue here.
    I have modified the sample dialog shipped with th article to have a block that displays 2 records
    <p>See the screenshot here</p>
    Here is the code in the When-Button-Pressed trigger:
      Set_Custom_Property( 'BLZ.BEAN', 1, 'READIMGFILE', 'd:/coyote.jpg' ) ;
      Set_Custom_Property( 'BLZ.BEAN', 2, 'READIMGFILE', 'd:/oracle_community.gif' ) ;So everything is ok for me.
    Francois

  • Multiple filters in a drop-down list in SharePoint 2010 browser forms

    I am using Infopath forms based on SharePoint 2010 lists. I am trying to filter a drop-down control based on inputs in two previous controls such that it looks up information in a list and returns options where A = A and B = B. This filter works when using
    Preview in Infopath 2010, but does not work on the list itself on publishing; it only filters where A = A. The B = B filter is ignored.
    1) Is there a workaround I can use so that the browser form respects the filter in the same way the Infopath form does?
    or, if not:
    2) Is there a way to force SharePoint 2010 to open up "new item" or "edit item" in InfoPath instead of in a browser form?
    Thanks.

    Thanks for your help!
    1) That was my concern. When I googled around, it seemed like it wasn't possible to do filters at all in DLL in browser forms, yet I had one that was working. So I was curious why one worked but two didn't.
    2) When I try to publish an InfoPath form from Designer that's based on a SharePoint list, the only option it gives me is to publish to that list, not to a document library.
    2a) If I did figure out how to do it, would it still submit the information to the list? I don't want a form library scenario where each list item is its own form based on a single template, I want a list I can also manage with Access.

  • How to pass record Group from Forms with DATA_PARAMETER to Reports Server

    How to pass record Group from Forms with DATA_PARAMETER to Reports Server using RUN_REPORT_OBJECT?
    When we use products on run time we are using data_parameter for passing record Groups to reports via run_product but now we have to use application server and reports server for same reports.
    We met with <FRM-41214 Unable to run reports> for passing DATA_PARAMETER to reports server when used RUN_REPORTS_OBJECT.
    How can we pass record Group from Forms with DATA_PARAMETER to Reports Server using RUN_REPORT_OBJECT?
    Thanks,
    Arif

    Hi Mandeep,
    Could you please tell me how can i pass data parameter from forms to report through run_product.

  • How can I update specific records in a tabular form

    I have a form with two blocks. One is a "simple form" and the other block is "tabular".
    In the "tabular form" I have some data (codigo, descripcion, importe)
    I want to update the item "importe" acording to specific values given in the "simple form". What I don4t know how to do is tell the form which record I want to update.
    Hope to be clear.
    Versnica

    Versnica,
    as i understood u got two blocks and u need to update that record in second block which value matches to block one .
    eg
    u can "A" item in values "Value1" in block 1 and there is record in block two with item "B" has same value "Value1". then u can use
    procedures like NAME_IN(<<item A>>) = NAME_IN(<<item B>>) then update the record in second block .
    see whether it helps for not ? otherwise u can send me forms on [email protected] so that i can have a look .

  • Update issue in the Master records & detail records

    Hi
    Good Day !
    Senario :
    I have Master - Details Form , Master Block - A, Detail Block - B
    In Master Block i have 10 records, For Each records in the Master will have related records in Detail ,
    Requirement :
    I want to reset records (some colums) in Master & then its related detail records in detail Block,
    After updating the first master record & its detail record the next Master Master reord & its detail records should be updated respectively...
    Can any one help on his, Its very urgent...
    Below is my sample code... Pls guide me... Thanks in Advance
    DECLARE
       num_total_records1   NUMBER;
       num_loop_i1          NUMBER;
       num_total_records2   NUMBER;
       num_loop_i2          NUMBER;
    BEGIN
       GO_BLOCK ('A');
       FIRST_RECORD;
       LAST_RECORD;
       num_total_records1 := TO_NUMBER (NAME_IN ('SYSTEM.CURSOR_RECORD'));
       FIRST_RECORD;
       FOR num_loop_i1 IN 1 .. num_total_records1
       LOOP
          UPDATE table_name_1
             SET columnA = NULL
           WHERE clause
          NEXT_RECORD;
       END LOOP;
       GO_BLOCK ('B');
          FIRST_RECORD;
          LAST_RECORD;
          num_total_records2 := TO_NUMBER (NAME_IN ('SYSTEM.CURSOR_RECORD'));
          FIRST_RECORD;
          FOR num_loop_i2 IN 1 .. num_total_records2
          LOOP
             UUPDATE table_name_2
             SET columnA = NULL
           WHERE clause
             NEXT_RECORD;
          END LOOP;
       commit_form;
    END;

    declare
          ln_rownum number;
    begin
         go_block('TEST_MASTER1');
         first_record;
         if :TEST_MASTER1.master_id is null then
               message('No records selected');
               message('No records selected');
               raise form_trigger_failure;
         end if;
         loop
              ln_rownum := to_number(:SYSTEM.CURSOR_RECORD);
              update test_master1
              set master_name = master_name||'Master '||to_char(ln_rownum)||' Updated'
              where master_id = :TEST_MASTER1.master_id;
              go_block('TEST_DETAILS1');
              first_record;
              if :TEST_DETAILS1.detail_id is not null then
                   loop
                        update test_details1
                        set DETAIL_NAME_NAME = detail_name_name||'Master '||to_char(ln_rownum)||' Updated'
                        where detail_id = :TEST_DETAILS1.DETAIL_id;
                        if :system.last_record = 'TRUE' then
                             go_block('TEST_MASTER1');
                             go_record(ln_rownum);
                             exit;
                        end if;
                        next_record;
                   end loop;
              else           
                   go_block('TEST_MASTER1');
                   go_record(ln_rownum);
              end if;
              exit when :system.last_record = 'TRUE';
              next_record;
         end loop;
         commit;
         clear_block(no_validate);
         execute_query;
    end;You hae take care of all validations. This is just a simple sample code..

  • Can't delete master record when matching when matching detail record exist

    Hi
    on the rel. property:
    Delete Record Behaviour = cascading
    Prevent masterless Operation =yes
    Automatic Query = yesCan't delete Record Master & Detail...
    On delete getting error msg.
    Can't delete master record when matching when matching detail record exist
    am i missing something...!
    Regards,
    Abdetu...

    First of all, remember the ripple affect of cascading deletes and updates.
    Oracle database allows creating master/detail relationship between tables using foreign keys and allows cascading deletes by defining the FOREIGN KEY constraint with ON DELETE CASCADE clause.
    Oracle Forms on the other hand, handle cascade delete thing internally when you set the relation properties.
    Now if you have 3 tables with MASTER->DETAIL1->DETAIL2 relationship and you have a form defined with MASTER->DETAIL1 relationship only, it won't let you delete (and save) master or detail record since the third table (DETAIL2) is referencing the rows from DETAIL1 which you are trying to delete.
    If DETAIL2 were present on the form, it would have deleted with relation property CASCADING. If you really want that when you delete a master record, all its details should be deleted too, then consider defining FOREIGN KEY constraints with ON DELETE CASCADE and on the form set relation property CASCADING.
    And if all master/detail tables are on your form and still it is not allowing you to delete master with cascading, there must be some code preventing it. Check triggers like ON-DELETE, KEY-COMMIT etc what they are doing.

  • Formula field, Detail records not getting updated

    Hello seniors,
    i need help on 2 issues;
    first, Issue No. 1
    i have master-detail form with the following tables;
    POH                                  master record table
    PH_NO                              pk
    PH_PARTY
    PH_FXRATE                       exchange rate
    PH_PD_LOCAL_TOT           total of PD_LOCAL_AMT  from details records
    PH_PD_FOREIGN_TOT       total of PD_FOREIGN_AMT  from details records
    POD                      Detail records table
    PD_PHNO              fk
    PD_ITEM
    PD_QTY
    PD_PRICE
    PD_LOCAL_AMT        
    PD_FOREIGN_AMT
    M_PD_FOREIGN_AMT       Formula (PD_QTY * PD_PRICE)
    M_PD_LOCAL_AMT           Formula (M_PD_FOREIGN_AMT/PH_FXRATE)
    CTRL                 Control block
    M_PH_PD_LOCAL_TOT           Summary-Sum-Table=POD, Field=M_PD_LOCAL_AMT
    M_PH_PD_FOREIGN_TOT       Summary-Sum-Table=POD, Field=M_PD_FOREIGN_AMT
    Triggers
    POH Table
    Pre-Insert   and   Pre-Update
    :PH_PD_LOCAL_TOT := :M_PH_PD_LOCAL_TOT
    :PH_PD_FOREIGN_TOT  := :M_PH_PD_FOREIGN_TOT
    POD Table
    Pre-Insert   and   Pre-Update
    :PD_LOCAL_AMT := :M_PD_FOREIGN_AMT
    :PD_FOREIGN_AMT :=  :M_PD_LOCAL_AMTThe problem that i am facing is while i UPDATE a record.
    whats happening is when the form is in Query mode and if i change a record, lets say
    change the value of the field PH_FXRATE, then what happens is, on screen i get all Detail
    record's M_PD_LOCAL_AMT Calculated & Updated, but the actual db field PD_LOCAL_AMT remains unchanged
    in the database after i press F10 or Save button.
    The update takes place for the POH table and form displays 1 Record updated.
    whereas if i have for example 4 detail records, then form should update those as well and display finally
    5 records updated is'nt it..?
    In query mode,if i insert new or modify an existing record in the detail block, then at this point, form marks just
    that particular record as CHANGED. Thus making changes at db level only for this particular record.
    what i want is once i make changes to the field PH_FXRATE, then form should mark all detail records
    as CHANGED and on saving, the PRE-UPDATE tigger of POD table should come in to force and the changes
    in the values of M_PD_LOCAL_AMT in turn to the db field PD_LOCAL_AMT should get affected at db level.
    i have also tried to put these assignments
    :PD_LOCAL_AMT := :M_PD_FOREIGN_AMT
    :PD_FOREIGN_AMT := :M_PD_LOCAL_AMT
    at PRE-UPDATE of POH table, thinking that form might consider
    all detail records, at this point. i noticed that it does it, but only picks
    1 record (i guess just the first record always) and change a db level.
    No. 2 Issue:
    i have put a POST-FORM-COMMIT at form level for auditing the Total fields of POH table against the details records.
    Declare
         M_LC_AMOUNT NUMBER(13,3);
                  M_FC_AMOUNT NUMBER(13,3);
    Begin
         SELECT SUM(PD_LOCAL_AMT) INTO M_LC_AMOUNT
         FROM POD
         WHERE  PD_PHNO = :PD_PHNO;
         IF  :PH_PD_LOCAL_TOT != M_LC_AMOUNT  THEN
              :PH_PD_LOCAL_TOT := M_LC_AMOUNT;
         END IF;
         SELECT SUM(PD_LOCAL_AMT) INTO M_FC_AMOUNT
         FROM    POD
         WHERE  PD_PHNO = :PD_PHNO;
         IF  :PH_PD_FOREIGN_TOT != M_FC_AMOUNT  THEN
              :PH_PD_FOREIGN_TOT := M_FC_AMOUNT;
         END IF;
    End;i was testing and notice that in a query mode when all records are displayed.
    if i go on changing values on records and save or save later keeping the form open,
    form allows, but if 1 come back to a record which i may have changed and saved earlier, then it flashes Error;
    "Records has been changed by another user, requery to ..."
    i want to do an Audit before final db-Commit and keep the user free from this Error..
    Please tell me first of all, is my approach for both of my issues,correct.?
    if not, then please suggest what should be changed.
    i'll highly appreciate for all your help. TYVM. Regards.

    I did exactly as you suggested. It works well for new record insertion
    but when i press F7 to query it, its flashes messages before displaying detail records
    Field must be entered.
    Mr. Andreas,
    i have problem only when i change value of PH_FXRATE. It re-calculates on screen values for M_PD_LOCAL_AMT
    (Formula M_PD_FOREIGN_AMT/PH_FXRATE)
    i want the changed value of M_PD_LOCAL_AMT to be saved in the actual db-field PD_LOCAL_AMT.
    for this i have PRE-UPDATE on POD Table
    :PD_LOCAL_AMT := :M_PD_LOCAL_AMT
    :PD_FOREIGN_AMT := :M_PD_FOREIGN_AMT
    Which is doing that.It is not marking the detial record as CHANGED.
    I tried giving the above assignments in the PRE-UPDATE on POH table.
    It saves the changed value in the db-field, but not all detail records, if more than 1.
    what you have suggested, will get me acheived what i am looking for..?

  • Portal Master-detail form how to auto assign detail record sequence number

    Portal Master-detail form how to auto assign detail record sequence number.Please help me?

    You can just read the following section
    Can I specify a sequence number generator as the default value for a form column?
    Yes. Enter the following in the "default value" field for the column:
    #<schema name>.<sequence name>.nextval
    where <schema name> is the name of the schema containing the sequence, and <sequence name> is the name of the sequence. The entry is preceded by a "#".
    For example, if the schema name is "SCOTT", and the sequence name is "CUSTOMER_SEQ", the default value entry is:
    #SCOTT.CUSTOMER_SEQ.NEXTVAL
    same way you can do for master - detail form.
    for more information on forms please refer the following URL.
    http://otn.oracle.com/products/iportal/htdocs/portal_faq.htm#BuildingApplications
    hope it helps.

Maybe you are looking for

  • How do I change the name of my voice memo in i tunes or finder?

    Hi there, I have been really interested  in reading the syncing problems folk are having with voice memos on the iphone. I have tried all the resets, rename, re sync variations that I can think of and still looking for a fix so that I can rename the

  • TV settings

    How do I change my settings for my tv once I've programmed my remote? I can get the settings guide to pull up but can't adjust them with uverse remote. Also can't use my tv remote to change the settings now that the uverse remote is programmed.

  • Bootcamp and Apple Keyboard Support

    Hi, Been looking on the internet but have had no luck! When using a Macbook Pro in Windows XP, I am having trouble getting inverted commas, speech marks, whatever you call them, basically this below The comma below is fine, when you shift however to

  • HT1325 Problems with purchased songs and new computers

    I have a new computer; my first mac. I am an apple convert, previously owning a toshiba. Some of the songs from an album I purchased through itunes will not play. What do I do? They have an ! with a circle around it next to them. I do not have a hard

  • New to Oracle DB/SQL

    Hi everyone, Can anyone recommend some good books/links to prepare for certification like DB SQL Expert? Thank you.