Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Get_Group_Record_Number Problem

199 views
Skip to first unread message

Lesley

unread,
Jan 5, 2001, 11:57:13 AM1/5/01
to
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
v_Listid varchar2(20); --contains contactid user selects in list.
v_contactID number; --contains contacts ID Currently displayed
group_id RecordGroup; --will hold ID of record group I will create
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.
v_contactID := :CoContacts.ContactID;

--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;

--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**************
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;


Eric Givler

unread,
Jan 5, 2001, 7:48:40 PM1/5/01
to
Can you try Hardcoding the list of selected columns?

"Lesley" <les...@vimich.com> wrote in message
news:934u2...@enews4.newsguy.com...

Jeremy

unread,
Jan 8, 2001, 8:28:39 AM1/8/01
to
I don't think that has anything to do with it. I'm having a problem finding
the record number of the selected record in the record group, until I get to
that point everything works fine. Also, there will only ever be one record
in the record group.
I'm assuming you mean hard coding the list item - hard coding it will be
much too limiting.
Thanks for you help though. If I've misunderstood you please let me know.
Lesley


"Eric Givler" <egi...@flash.net> wrote in message
news:IXt56.36889$bw.23...@news.flash.net...

0 new messages