This discussion is archived
8 Replies Latest reply: Nov 26, 2012 12:41 AM by O.Developer RSS

setting the update property of the row of a records group to false IN ORACL

968357 Newbie
Currently Being Moderated
hello

i have to populate a records group with the previous records user had entered as well as enable the user to enter new record in that RECORD GROUP IN ORACLE 6I FORMS.
I want that previous record that user had entered caN NOT BE EDIT .USER CAN SEE THESE RECORDS ONLY AND ACCORDINGLY ADD NEW RECORDS IN SAME RECORD GROUP.

PL TELL ME HOW TO DO THIS.


THANKS & REGARDS
VISHAL AGRAWAL
  • 1. Re: setting the update property of the row of a records group to false IN ORACL
    O.Developer Journeyer
    Currently Being Moderated
    It is simple.

    Make LOV with your query

    Attach to Fileld and Select NO to Validate from List.

    That is it...it will work as you expected.


    ----------

    Hope you got it !

    Edited by: O.Developer on Nov 24, 2012 12:09 PM
  • 2. Re: setting the update property of the row of a records group to false IN ORACL
    968357 Newbie
    Currently Being Moderated
    thanks for ur immidiate reply...
    but i have to display all the previous records and also the new recoprds which user is about to enter in one record group in tabular forms.
  • 3. Re: setting the update property of the row of a records group to false IN ORACL
    O.Developer Journeyer
    Currently Being Moderated
    Your understanding may be clear...

    when you complete the full steps what i mentioned.


    Do TRy and provide the feedback/Errors!
  • 4. Re: setting the update property of the row of a records group to false IN ORACL
    968357 Newbie
    Currently Being Moderated
    I also try for which u mentioned earlier but it is like selectting individual records to display in my tablular record group.
    we are using following code for fetching data and displaying it into records group and also making all fetched record disabled.
    code is given below :

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------
    PROCEDURE fetchdata(mf char) IS
    cursor c1 is select dateofmtrl,rm1,rm2,rm3 from rawmtrl_graph
    where
    dateofmtrl between TO_DATE(TO_CHAR(ADD_MONTHS(SYSDATE, 0),'YYYYMM'),'YYYYMM') and
    TO_DATE(TO_CHAR(ADD_MONTHS(SYSDATE, + 1),'YYYYMM'),'YYYYMM') - 1 and
    mtrl_flag = mf
    order by dateofmtrl ;
    r1 c1%rowtype;
    lstrec number;
    cnt number :=1;
    BEGIN
    go_block('dtl');
         last_record;
    lstrec:=:system.cursor_record;


    for ctr in 1..lstrec
    loop
         delete_record;
    end loop;     

    first_record;
         open c1;
         loop
              fetch c1 into r1;
              exit when c1%notfound;
              if :dtl.date1 is not null then
                   next_record;
                   end if;
              
                   :dtl.date1:=r1.dateofmtrl;
                        :dtl.opc:=r1.rm1;
                             :dtl.ppc:=r1.rm1;
                                  :dtl.total:=r1.rm1;          
              
         end loop;
         close c1;
         
    last_record;
    lstrec:=:system.cursor_record;

    first_record;
    for ctr in 1..lstrec
    loop
    SET_record_PROPERTY(:system.cursor_record,'dtl',ENABLED,PROPERTY_FALSE);
    SET_RECORD_PROPERTY(:SYSTEM.CURSOR_RECORD, 'dtl',UPDATE_ALLOWED,PROPERTY_FALSE);
    SET_RECORD_PROPERTY(:SYSTEM.CURSOR_RECORD, 'dtl',insert_allowed,PROPERTY_FALSE)
    next_record;
    end loop;     
         first_record;
         
         
    END;
    --------------------------------------------------------------------------------------------------------------------
    But it is not working...
    givinng the erros that no such property for set_record_property
    pl tell me how to modify the code to disable some selected raws in a record group............
  • 5. Re: setting the update property of the row of a records group to false IN ORACL
    Andreas Weiden Guru
    Currently Being Moderated
    Firstly, i think you are talking about a tabular block, not a recordgroup.

    At second, you cannot set INSERT_ALLOWED, UPDATE_ALLOWED and ENABLED for a record. You have to set it explicitly for each item in a record using SET_ITEM_INSTANCE_PROPERTY.

    Lastly, the way you populate your block is not the way you should do it. Base your block on your table using the datablock wizard, then simply populate it using EXECUTE_QUERY;. Then, all update, insert and deletes will be managed automatically by forms.
  • 6. Re: setting the update property of the row of a records group to false IN ORACL
    O.Developer Journeyer
    Currently Being Moderated
    This is not what you explained earlier. Further your coding is confusing.....

    Be clear exactly what you need,


    Secondly you please redefine your requirements. If you reconfirm you requirement you will get it easily.


    In case if you need more help from us, can you please give example using Schott schmea, so that we all in the same page
  • 7. Re: setting the update property of the row of a records group to false IN ORACL
    968357 Newbie
    Currently Being Moderated
    thank u for ur immidiate reply & taking interest in my issue.
    set_item_instance_property solved my issue.

    thanks u

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points