Re: populate record group error
Date: Thu, 09 Mar 2000 14:48:09 -0800
Message-ID: <38C82A29.D1198BF4_at_navair.navy.mil>
Thanks for the infor. The code seems to work the first time through now, however, it does not populate the second time through. I think the record group needs to be set to NULL and I am not sure how to do this. I have changed my code to the following and I get the error record group not populated.
PROCEDURE Execute_Form
(formCategory IN VARCHAR2,
fromMenu IN BOOLEAN) IS
formChoice BOOLEAN;
fromGroup VARCHAR2(10);
BEGIN /* ADD CODE
- Need to build the query for the common record group based on formCategory
- and then call common LOV*/ Declare group_id RecordGroup; query_ok NUMBER;
BEGIN
--Create temporary record group.
Delete_Group(group_id);
group_id := Create_Group_From_Query('common_group',
'SELECT role.name, screen.title from role, screen
WHERE role.sc_name = screen.sc_name AND screen.sc_name = '''||formCategory||''''); IF ID_NULL(group_id)THEN Message('Record Group does not exist.'); RAISE FORM_TRIGGER_FAILURE;
END IF; query_ok := Populate_Group(group_id); IF query_ok <> 0 THEN
RAISE FORM_TRIGGER_FAILURE;
END IF;
END;
declare
lov_id LOV;
Begin
lov_id := Find_LOV(formCategory);
Set_LOV_Property(lov_id,GROUP_NAME, 'common_group');
END;
--FOR loopIndex IN 1 .. userRoleList.COUNT LOOP
IF (formCategory = 'CRA') THEN
formChoice := SHOW_LOV('CRA');
fromGroup := 'common_group';
ELSIF (formCategory = 'MATERIAL') THEN
formChoice := SHOW_LOV('Material');
fromGroup := 'common_group';
- ELSIF (formCategory = 'PROD_OPS') THEN
- formChoice := SHOW_LOV('PROD_OPS');
--ELSIF (formCategory = 'REPORTS') THEN
--formChoice := SHOW_LOV('Reports'); END IF;
- formChoice := SHOW_LOV('PROD_OPS');
:GLOBAL.From_Group := fromGroup;
IF (fromMenu) THEN
NEW_FORM(NAME_IN('PARAMETER.Form'));
ELSE
CALL_FORM(NAME_IN('PARAMETER.Form'), HIDE, DO_REPLACE);
END IF;
END IF;
END;
Elrond wrote:
> I think it's wrong. > Then a group should execute query like this : > SELECT role.name, screen.name FROM role, screen WHERE role.name = > v_role_name > so what is it ? sql return an error , what is v_role_name ? The select for > this group should be like this : > 'SELECT role.name, screen.name FROM role, screen WHERE role.name ='|| > v_role_name or better > 'SELECT role.name, screen.name FROM role, screen WHERE role.name ='''|| > v_role_name||'''' > You have to pass a VALUE of v_role_name not just a string 'v_role_name'; > Maciej Myrcha >Received on Thu Mar 09 2000 - 23:48:09 CET