Get_Group_Record_Number Problem

From: Lesley <lesley_at_vimich.com>
Date: Fri, 5 Jan 2001 11:57:13 -0500
Message-ID: <934u2902153_at_enews4.newsguy.com>


[Quoted] I keep getting error frm-40733 "PL/SQL Built In Get_Group_Record_Number Failure"
I just want the user to be able to select a contact in a list box, and update the fields in the form with the info for that contact. So I'm Building a record group based on the selected Contact. Then finding the record number with Get_Group_Record_Number, which is failing.

Below is my code, and just below the asterisks is where it's failing and I don't understand why.
Please help.
Thanks.
Lesley

Declare

[Quoted]  v_Listid      varchar2(20);   --contains contactid user selects in list.
[Quoted]  v_contactID     number;      --contains contacts ID Currently displayed
 group_id      RecordGroup;    --will hold ID of record group I will create
[Quoted] [Quoted]  group_name     Varchar2(20);   --name I will assign the record group
 Query_OK      Number;

 Record_Number Number;

Begin

 v_listid := :cocontacts.lst_cocontacts;                --contains ContactID
From lst_Cocontact that cursor is on.
[Quoted]  v_contactID := :CoContacts.ContactID;

[Quoted]  --first create record group & assign name   Group_Name := 'Qry_Contact';
--make sure group doesn't already exist, if it doesn't, create it
otherwise delete it.
  Group_ID := Find_Group(Group_Name);
  IF ID_NULL(Group_ID) Then
   Group_ID := Create_Group_From_Query('Qry_Contact',

         'Select * From Vimich.CoContacts Where ContactID = ' || v_ListID);   else
   delete_Group('Qry_Contact');
   Group_ID := Create_Group_From_Query('Qry_Contact',

         'Select * From Vimich.CoContacts Where ContactID = ' || v_ListID);   End if;

[Quoted] [Quoted] --make sure the query is populated without error
  Query_OK := Populate_Group(Group_ID);
  if Query_OK <> 0 then
  RAISE FORM_TRIGGER_FAILURE;
  message ('Error in When_List_Changed Event');  end if;

--assign the recordnumber. Must use the fields below where they match.
  ****THE FOLLOWING LINE IS WHERE IT FAILS************** [Quoted]   Record_Number := Get_Group_Record_Number('Qry_Contact.ContactID', v_ListID);

--now Force the form to go to that record.
 if Record_Number is not null then
   Go_Record(Record_Number);
 else
  Message ('Unable to retrieve record number for this contact, try again');  end if;

end; Received on Fri Jan 05 2001 - 17:57:13 CET

Original text of this message