Re: Forms 4.5 PopLists Question

From: Amir M. Farhi <phantom_at_math.tau.ac.il>
Date: 1996/04/12
Message-ID: <316E3849.43E2_at_math.tau.ac.il>#1/1


nickjost_at_mammoth.valleynet.com wrote:
>
> This deals with Forms 4.5 Designer/2000 release. I have the following
> pre-form trigger:
>
> DECLARE
> Purch_Type_Code_List RecordGroup;
> Sale_Type_Code_List RecordGroup;
> List_ID1 Item := Find_Item('PURCH_TYPE_FK');
> List_ID2 Item := Find_Item('SALE_TYPE_FK');
> Status1 Number;
> Status2 Number;
> BEGIN
> Purch_Type_Code_List := Create_Group_From_Query('Purch_Type_IDs',
> 'SELECT to_char(purch_type.purch_type_pk),
> to_char(purch_type.purch_type_pk)
> FROM purch_type
> ORDER BY purch_type.purch_type_pk');
> Status1 := Populate_Group(Purch_Type_Code_List);
> Populate_List(List_ID1, Purch_Type_Code_List);
> Add_List_Element(List_ID1, 2, 'List2', '1');
> Delete_List_Element(List_ID1, 2);
> END;
>
> Now the frustrating part is that add_list and delete_list *work* but the
> populate_list gives the error:
> FRM-41337: Cannot populate the list from record group
>
> Suggestions more than welcome....
>
> Nick Jost
> Systems Analyst
> Standard-Rent-A-Car

-- 


This problem usually occurs when non of the populated items matches
the "Default Value" and the "Other Values" properties of the List
Item.

If you know at least one value that the select clause will fetch from
the database for sure then use it in the  "Default Value" and "Other Values"
properties. If not, then I suggest the following:

         Purch_Type_Code_List := Create_Group_From_Query('Purch_Type_IDs',
                 'SELECT to_char(purch_type.purch_type_pk),
                         to_char(purch_type.purch_type_pk)
                         FROM purch_type
                         ORDER BY purch_type.purch_type_pk
--->               UNION SELECT NULL,NULL FROM DUAL');

and then leave the "Default Value" and "Other Values" empty.


Good Luck

Amir Farhi


*****************************************************************************
*                                Amir M. Farhi                              *
*                              Oracle consultant                            *
*                                                                           *
* Office:                                   Home:                           *
*          John Bryce (Systems) 1984 Ltd.            4 Yochanan Hagadi St., *
*          35 Jabotinski St.,                        Tel-Aviv 62269         *
*          Ramat-Gan 52511                           I S R A E L            *
*          I S R A E L                      TeleFax: 972-3-5445458          *
* Phone:   972-3-5765660/6                  Mobile:  972-52-450424          *
* Fax:     972-3-6131175                    e-mail:  phantom_at_math.tau.ac.il *
* e-mail:  afarhi_at_il.oracle.com                      (Tel-Aviv University)  *
*****************************************************************************
*      visit my WWW home page at  http://www.math.tau.ac.il/~phantom        *
*****************************************************************************
Received on Fri Apr 12 1996 - 00:00:00 CEST

Original text of this message