How to modify-detail record

I have a master detail form
i have three items in detail
i want to delete one of them
i wrote
clear_record;
commit;
on when button pressed
but it not works
regards
vikas Singhal

you'll have to use the delete_record built-in to delete a record.
Clear_record removes the record from the block, but does not delete it.

Similar Messages

  • 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 to control detail records displayed after requery

    I have a master/detail form. I did not like the behavior of the screen clearing after I did a save so I added code to requery the master/detail records. There is still one behavior which I need to fix -- after I requery the master and detail records, I always get the first set of detail records, not the set of records displayed on the screen when I did the save. So if I have detail rows 40-50 displayed on the screen and do a save, the master/detail rows are requeried but I see rows 1-10 on the screen, not 40-50. Any ideas how to code around this?

    This is due in part to the fact that detaching the detail object from its master and actually deleting the detail object are two different things. To work around this, add the following in your session bean, where Departments and Employees are your master/detail objects, respectively:
    public void removeNestedEmployee(Employees entity) {
    Departments owningDept = entity.getDepartment();
    owningDept.removeDepartment(entity);
    UnitOfWork uow = getSessionFactory().acquireUnitOfWork();
    uow.deepMergeClone(owningDept);
    Object empWorkingCopy = uow.readObject(entity);
    uow.deleteObject(empWorkingCopy);
    uow.commit();
    Re-generate the data control for this session bean and then drag and drop this method onto your JSF page. The argument you'll pass in is the data provider for the selected employee:
    ${bindings.departmentCollectionIterator.currentRow.dataProvider}
    This will both detach the record from the owning entity, delete the record, and force a refresh of both the master and detail iterators.
    Hope this helps,
    Lynn Munsinger
    Oracle JDeveloper and ADF Product Management

  • How to concat detail records in one line

    Hi,
    I would like to concat all empoyees and it as column next to department name, like that
    DEPTNO DEPTNAMR EMPLIST
    Is there any way to do it using select without user-define function to concat emp records
    Im using O10R2
    Thanks & best regard

    Take your pick, these examples span several database versions:
    http://www.oracle-base.com/articles/misc/StringAggregationTechniques.php

  • How to delete the master records when corresponding details records exist.

    What is the SQL statement to delete the records of master when the corresponding detail records are present.
    Note: No Cascade clause was used at the time of creation of referential integrity constraint.
    "M"- Master Table
    "D"- Detail Table
    I used, "Delete from M cascade". This statement is not working.
    Your favour in this will be deeply appreciated.
    Cheers
    PremChin

    Hi folk,
    i appreciate your suggestion,
    my crux of the situation is to know whether there is a way to make it without disabling,removing or modifying the referential integrity constraint.
    If so, modifying, please help me out how to modify the constraint in order to remove the master records keeping detail records in-tact.
    Cheers
    Premz

  • OAF matester detail page : How to have a "Show All" feature on screen, so that all the master and details records are expanded .

    Hi ,
    I was trying to have a "SHOW ALL" feature on the master - detail page,
    the detail table is an advancec table.
    Please help me with inputs on how to have  "SHOW ALL" feature,
    Currently, we have to click on  ":Show" for each record at master level to view the child data.
    Trying to achive "Show All" Feature so that on click of this the master records on the page 'Expands"  showiing all master records with respective detail records.
    Regards
    bhuvanm

    Hi,
    You should not set DetailFlag = "Y" in whereclause because there is no such record.
    Also detail flag is transient attribute and not the query column, hence the error "Invalid indentifier".
    I asked you to use DetailFlag as query column with static value "Y".
    for example:
    SELECT "Y" detail_flag
    FROM <table_name>
    This will display all the table records in expanded format. if you want it conditionally then use decode on some bind parameters.
    For example:
    SELECT DECODE(:1, "SHOWALL", "Y", "N") detail_flag
    FROM <table_name>
    This bind parameter should be passed whenever you want to execute query for the table.
    Regards,
    Sandeep M.

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

  • How to delete  the record  of saved HRA Details...

    Hi Experts,
    I have put the details of HRA Correctly.But while updating HRA In 0008 Infotype i wrongly updated the wagetype,How should i change the Wagetype.
    When i m trying to delete it is showing  RECORD CAN NOT BE DELETED (TIME CONSTRAINT 1).
    How can delete the record.
    Thanking u .
    Sai

    Hi
         Hope doing well ........ No need to delete any infotype but u can go to PA30 and in change mode their u can delete the wagetype which is wrongly entered
    Rajeshk

  • Master - Detail -- How to Hide page if no detail records

    I'm hoping to be able to hide a page if no detail records exist for the master query.
    My master query:
    "Company" and "account" and balances for each account
    (balances carry forward from previous months)
    Detail Query:
    transactions for each account for a month
    -- Linked to the master by "account-id"
    The master query is grouped into 2 parts:
    a) Company
    b) account and balance
    Sometimes an account won't have any transactions during the month (especially if the report is run at the beginning of the month)
    If I create a "summary" count field in the "account" group based on the transactions, then I can hide (not print) the "account" frame.
    But I can't figure out how to do this for the "company" frame.
    I'm probably missing something simple (or maybe not)
    Any suggestions?
    Thanks,
    Eric

    So basically you are showing each account on a separate page?
    Move the objects shown in Company repeating frame to the account repeating frame. In this case company repeating frame will be blank. And your already created format trigger to hide account frame will work for both (company+account). So whenever any account is zero, it will hide all objects within the frame. Parent frame doesn’t contain any objects, it would not show the parent frame for that account. Make sure vertically elasticity of the frame is variable.
    Hope this helps.

  • How to create One Master - and 2 detail records region

    Hi,
    My requirement is to have three regions on a single page, one for master record and two for detail records.
    Also, one detail record region needs to upload images (photos) to database.
    Can some one tell me how to do this in APEX.
    Thanks
    Aali

    Hi Aali, I have the same issue in a master detail form, I don't know how to upload images in the detail form, can you help me please.
    Thanks and regards,
    Wilson

  • How to modify the query to get max id record

    Hi All,
    How to modify below query to get proper result.The query is returning some records are duplicated.I need only one record to display from duplicate based on max assetid.
    Here is my query:
    SELECT *
    FROM (
    SELECT a.uppertitle, a.composer, a.esongid,
    MAX (asset_new.assetid) AS assetid,asset_new.ownerid
    FROM (SELECT DISTINCT NVL (esong.title, '~') AS uppertitle,
    INITCAP (NVL (esong.composer, '~')
    ) AS composer,
    esong.esongid
    FROM esong, esongcountry_us eus
    WHERE 1 = 1
    AND eus.esongid = esong.esongid
    AND eus.isocountrycode IN ('US')
    AND esong.title LIKE 'LIVE TO TELL%'
    AND ROWNUM < 390) a,
    songwebrecording,
    recordingasset_new,
    asset_new
    WHERE a.esongid = songwebrecording.esongid(+)
    AND songwebrecording.recordingid = recordingasset_new.recordingid(+)
    AND recordingasset_new.assetid = asset_new.assetid(+)
    GROUP BY a.uppertitle, a.composer, a.esongid,asset_new.ownerid)
    WHERE ROWNUM <= 390
    ORDER BY uppertitle
    result:
         upperlittle composer esongid assetid onwerid
    1.     LIVE TO TELL Gelb, Howe 480340000 null      null
    2. LIVE TO TELL FROM THE Madonna (Ca)/ Leonard 125559900 null null
    3. LIVE TO TELL FROM THE Madonna (Ca)/ Leonard 125559900 3080366 null
    4. LIVE TO TELL FROM THE Madonna (Ca)/ Leonard 125559900 3038107 null
    5. LIVE TO TELL THE TALE Holopainen 859841500 nulll nulll
    I need the result like this :
         upperlittle composer esongid assetid onwerid
    1.     LIVE TO TELL Gelb, Howe 480340000 null      null
    2. LIVE TO TELL FROM THE Madonna (Ca)/ Leonard 125559900 3080366 null
    3. LIVE TO TELL THE TALE Holopainen 859841500 nulll nulll
    Please help me on this regard. oracle version is 9i
    Regards,
    Rajasekhar

    can you please format your code with                                                                                                                                                                                                                        

  • How to create multiple detail records dynamically  ?

    Hi All,
    I have a master-detail Form. I would like to display 5 records from details in my form. After entering data in 5 records in my detail how do I create a new detail record. And how can I get a scroll bar to manage them ? Right now all I could do is just create 5 records as default while designing the form.
    Can anyone please help me out ASAP.
    Thanks very much,
    Murali
    [email protected]

    Hi murali,
    Currently this is the way how MD forms works.If you wish to add more records in one go you can set at the design time for more no of detail records using "Number of Detail Rows to Display" in the Detail section .There is no provision of scrollbars at present.
    The other time when you enter just enter the Master form's key value with "Master action" set to none and just insert the Detail Form's record using the "Detail actions " to Insert.
    Hope it helps.
    rahul

  • How do you detect duplicate detail records

    Hi,
    How do i detect that a user is capturing a duplicate detail record as the user transverses detail records before saving. I don't want to keep a unique constraint on the database, but trap the duplicate record as the user captures. i want to notify the user values he captured for a record have already been captured on an earlier record as he is capturing.
    I found using collections to be messy as they have to be updated each time the user updates any value on the detail record. So it becomes difficult to manage the collection.
    I normally have to loop through the detail block before the user saves and check for duplicate values and raise a error when one is found.
    Is there a better way of achieving this in forms? IS there some block property I can set?
    Edited by: parthiv108 on Mar 21, 2011 3:52 AM

    a simple method is doing the check in the PRE-INSERT and PRE-UPDATE trigger, like
    DECLARE
        v_cnt NUMBER;
    BEGIN
        SELECT COUNT(*)
        INTO v_cnt
        FROM your_table
        WHERE  .... <your_criteria>
        IF v_cnt > 0 THEN
            MESSAGE('Duplicate Record found! Please clear this record!');
            RAISE FORM_TRIGGER_FAILURE;
        END IF;
    END;disadvantage: the check will not be done immediatly at user entry, but on commit ....

  • How to print blank records after the detail records in a masterdetail report

    Hi,
    Developing a report for time and attendance record. In this report I am printing all the employees in a department, limiting the no. of records per page to 10.
    I need to insert blank lines at the end of all of the detail records in a page that has less than 10 employee records so that the no. of records displayed on a page can always be 10(these blank lines will facilitate the management to note down the temporary employees who worked for the department but are not part of the department).
    I am using a tabular form with group above layout.
    The report layout is as follows:
    Department : FINANCE & ADMINISTRATION
    Employee Name | Employee Number |
    1 Jim | 1234 | _________________
    2 John | 5678 |__________________
    3 blank
    4 blank
    5
    6
    7
    8
    9
    10 balnk
    Supervisor's Sign:______________________
    Note: the no. of blank lines should be inserted dynamically based on the no. of emp. records being printed on the page.
    Any help is greatly appreciated.
    Thanks in advance.
    Kavita.

    Your solution works when I am not limiting the no. of records per page for a department to 10 records and when I want to print blanks lines for the depts that has fewer than 10 employees in it.
    Exactly in my report I have several dept's that has more than 10 emp's. In such cases I'll be printing first 10 in one page and the rest in the next page. Now I want to dynamically print the blank lines in the second page depending on the no. of emp's on that page. I tried to acheive this by using a CS column that reset's at page level but, REPORTS is not letting me use CS column that reset's at page level in a format trigger. I also tried to copy the CS value into a parameter and or to a Place holder column and did not help.
    Any more work around ideas to acheive this?? please help.
    Thanks alot
    Kavita.
    Hi
    Create a column called Serial_No in ur emloyee query like this
    select 1 , empno ,ename from emp;
    Create a summary column on the serial column with the function SUM
    and resetting it to Page
    Display the column in the report by using the text color as white
    so it doesn't display in the report
    I think this should help u i believe
    Sri
    Hi,
    Developing a report for time and attendance record. In this report I am printing all the employees in a department, limiting the no. of records per page to 10.
    I need to insert blank lines at the end of all of the detail records in a page that has less than 10 employee records so that the no. of records displayed on a page can always be 10(these blank lines will facilitate the management to note down the temporary employees who worked for the department but are not part of the department).
    I am using a tabular form with group above layout.
    The report layout is as follows:
    Department : FINANCE & ADMINISTRATION
    Employee Name | Employee Number |
    1 Jim | 1234 | _________________
    2 John | 5678 |__________________
    3 blank
    4 blank
    5
    6
    7
    8
    9
    10 balnk
    Supervisor's Sign:______________________
    Note: the no. of blank lines should be inserted dynamically based on the no. of emp. records being printed on the page.
    Any help is greatly appreciated.
    Thanks in advance.
    Kavita.

  • How to print alternative colors in detail records in BI publisher?

    Hi,
    i have child or detail records. But i want to print them first record in red color,then second record in green color. Again third record color again in red color and fourth record again in green color.
    Thanks,
    lax

    Have two form fields after the grouping form field and use the following code in the first conditional form field:
    <?if@row:number(position() mod 2)=0?><?attribute@incontext:background-color;'red'?><?end if?>
    Include this in the second conditional format field.
    <?if@row:number(position() mod 2)!=0?><?attribute@incontext:background-color;'green'?><?end if?>
    Thanks,
    Bipuser

Maybe you are looking for

  • Loop fields in an internal table

    Dear experts, I have a scenario where I have an internal table (created in an end routine) c of felds that are both characteristics and key figures. I would like to do is to modify this table so that I keep the value of the charactersitics but I set

  • How to change the width of the Properties Character Family block

    I'm a n00b with Captivate but notice I am unable to change the font family or style in the block area because it runs into the side scroll bar. Based on videos I've seen, there should be an arrow allowing the ability to scroll down to font. The only

  • Filetype HTML.xht workaround for Dreamweaver CS5.5

    upon upgrading to Dreamweaver CS5.5, i noticed that files of filetype HTML.xht in one of my web projects either wouldn't open in Dw, or wouldn't open with link color cueing and file management. the known workaround is configuring the following files

  • Qosmio F50 - Up arrow signal when HDMI cable connected

    Hello, I've been able to connect my laptop to my LCD TV (LG LH4000) through HDMI but every 3~5 seconds it seems to receive a signal from the up arrow. Let's say I'm browsing some files in the windows explorer and it goes up one file, just as if someo

  • Downloading, Saving and moving Video

    I'm going to be traveling for about 4 weeks and would like to be able to download my camcorder while on the move. I have a Macbook Pro, and an stand alone hard drive. I would like to have all my raw video material on the stan alone hard drive and the