This discussion is archived
4 Replies Latest reply: Dec 10, 2012 4:18 PM by JeanYves Bernier RSS

frm 40502 unable to read list of values

Naamas Newbie
Currently Being Moderated
Hi all
i have a record group query like this :
 
select UNIT,REGION
FROM UNITS
where action !='D' 
and region in (:parameter.unit)
while i'm pressing the button that shows the lov i'm getting the error
FRM 40502 unable to read list of values.
please help
Thanks In Advanced
Naama
  • 1. Re: frm 40502 unable to read list of values
    FrançoisDegrelle Oracle ACE
    Currently Being Moderated
    Hello,

    Maybe Forms does not like that:
    and region in (:parameter.unit)
    Try to populate the RG with Populate_Group_With_Query() that accepts SQL stored in a string.

    Francois
  • 2. Re: frm 40502 unable to read list of values
    Naamas Newbie
    Currently Being Moderated
    Hi
    thanks for the response
    please donate an example ,
    i have a button which have a trigger when-button-pressed
    declare 
    g_lov boolean;
    begin 
    g_lov :=show_lov(lov_unit);
    end ;
    the lov_unit is base on the record group ,
    i did not really understood the use in the syntax , is it instead of the existance RG ? and where shold i write it down ?
    please help i'm new to forms
    Thanks In Advanced
    Naama

    Edited by: Naamas on 05:54 10/12/2012
  • 3. Re: frm 40502 unable to read list of values
    FrançoisDegrelle Oracle ACE
    Currently Being Moderated
    Open Forms Builer then press F1 to get the online help. Seach for CREATE_GROUP() to get the exemple
    ...
    /* ** Populate group with a query */ 
    errcode := Populate_Group_With_Query( rg_id, 'SELECT SAL-MOD(SAL,1000),COUNT(EMPNO) ' ||'FROM EMP ' ||'GROUP BY SAL-MOD(SAL,1000) ' ||'ORDER BY 1'); 
    END; 
    You can populate the RG at startup time if the content does not change, or you can populate it at any time.

    Francois
  • 4. Re: frm 40502 unable to read list of values
    JeanYves Bernier Explorer
    Currently Being Moderated
    Hi Namas,
    and region in (:parameter.unit) 
    Can you tell me what are the values stored in the *:parameter.unit* ?

    Regards

    Jean-Yves

    edit :
    I think the main problem is that you use in, that means that you try to store more then one value in your parameter.unit (something like 1,2,3) which result on the frm 40502 unable to read list of values.
    Especialy if you REGION field is a number and your parameter in a char (which can accept the value 1,2,3 that a number parmameter won't accept)

    Edited by: JeanYves Bernier on 11 déc. 2012 00:57

Legend

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