2 Replies Latest reply: Aug 23, 2013 11:02 AM by akm006 RSS

    Can a function be called from record group - Oracle Form 6i.

    akm006

      Hi All,

       

      I want to create Query based LOV in Oracle Form 6i.

       

      The Query i use in record group is as follows :

       

      SELECT DISTINCT

             nr.rec_locator AS  rec_locator,

             car.car_dte AS  car_date,

             Get_car_info(:CON.REF_NO)  AS car_number

        FROM car_list_entries car,

             contact_details cdt,

             name_records nr

      WHERE     car.car_id = cdt.car_id

             AND cdt.nr_id = nr.id

             AND cdt.con_ref_no = :CON.REF_NO

       

      /* Get_car_info( x NUMBER) is a Form Function */

       

      this throws an error :

      It says

      frm-12001 (Cannot Create the Record Group (Check your Query)


      Kindly guide how can i use the Form function to get the desired output.

       

      Many Thanks,

      Anoop.

        • 1. Re: Can a function be called from record group - Oracle Form 6i.
          LT.ora

          Hi Anoop,

           

          I can assure you that the issue is not because of the function being called from record group;

          I've used query showing value from function; but one thing that you must keep in mind is :


          If you create an unbound item in a lov based of sql expression which

          return a datatype character, and if the bound item used in the function

          is generated with a size 0, then the unbound item is generated

          with a size 4000 and compilation of the form failed with error FRM-30187

           

          the solution to the above problem is : lov property > Column Specification > one columns will be having length greater then 2000 there set it to 2000 which is maximum value. Then it will work.

          • 2. Re: Can a function be called from record group - Oracle Form 6i.
            akm006

            Hi LT.ora,

             

            Many Thanks for your advise, the mistake i made was calling a FORM function, when i used a DATABASE function every worked smoothly

             

            And yes... i did face a second issue which you pointed out ( error FRM-30187)...!! But thanks to you for the solution in advance

             

            Cheers!!