Re: Populating List Item via Query in Forms 4.5
Date: 2000/07/20
Message-ID: <lJEd5.7$6N2.1441_at_wdc-read-01.qwest.net>#1/1
Create the record group in the form builder. Here are snippets from a 5.0 form that should be compatible with 4.5 (it's been over 15 months):
Record Group Name: BUDGET_GROUP_RG
Record Group Query: select name, to_char(budget_group_id) from
sal_budget_group order by 1
Column Specifications:
Name; Char; 80
ICRGGQ_0; Char; 40 [defaults?]
List Item Name (in Control_Block): BUDGET_GROUP
Item Type: List Item
List Style: Poplist
Elements in List: (empty)
Form-level trigger WHEN-NEW-FORM-INSTANCE contains:
Set_Up_List('BUDGET_GROUP', 'BUDGET_GROUP_RG');
Program Unit SET_UP_LIST (Procedure):
PROCEDURE SET_UP_LIST(pList in VARCHAR2, pGroup in VARCHAR2) IS
vErrFlag NUMBER :=0;
eListPopulationProblem exception;
BEGIN
vErrFlag := Populate_Group(pGroup);
if vErrFlag = 0 then
Clear_List(pList);
Populate_List(pList, PGroup);
elsif vErrFlag = 1403 then
- No list elements found null; else raise eListPopulationProblem; end if; EXCEPTION WHEN OTHERS THEN message('Exception: Could not populate '||pList ||' with query in group '||pGroup||'.'); END Set_Up_List;
See if this helps.
- Mike
"Brice Toth" <bat107_at_psu.edu> wrote in message
news:397700F1.63852221_at_psu.edu...
> Hello. I am trying to populate a list item from a
> query using Forms 4.5. First of all, I created a
> WHEN-NEW-FORM-INSTANCE trigger to do all of this, is
> that the route I want to take here?
>
> Anyway, within my trigger, which compiles, I create
> a record group from a query with the built-in
> Create_Group_From_Query function. I then populate the
> group, also with the built-in Populate_Group function.
> I then populate the list, with the Populate_List function.
> However, still nothing shows up in my list when I run the
> form. If I go to SQLPlus and run the same query, I get
> rows returned, so I know there should be rows going to my
> query to create the record group.
>
> Does anyone here know what I'm doing wrong?
>
> Please email me!
>
> Thanks!
>
> Brice Toth
> bat107_at_psu.edu
Received on Thu Jul 20 2000 - 00:00:00 CEST