CLEAR_LIST generates an error 41331 - - 1403

From: Tree4 <trevor.bryan_at_siemens.com>
Date: 20 Aug 2003 00:16:40 -0700
Message-ID: <ad7274f9.0308192316.2ad7c657_at_posting.google.com>



Background.

I have 2 database items in a data block. One called BADGE_TYPE and the other called LOCATION_ON_BODY
Both are poplist types.
Both have the following properties:

	Mapping of other values = <blank>
	Intial value = <blank>

Both are intially populated via the WHEN_NEW_FORM_INSTANCE trigger which calls 2 program units
that have code of the following format.



PROCEDURE SETUP_DROPDOWN_LISTS_BODY_LOCA IS BEGIN
  BEGIN
	DECLARE
	X ITEM;
	g number;
	BEGIN

    X := FIND_ITEM('SS_PASSIVE_VISITS.LOCATION_ON_BODY');
  • CLEAR_LIST(X); g := populate_group('LISTITEM_BODYLOCATIONS'); Populate_list(X, 'LISTITEM_BODYLOCATIONS'); END; END; END;
PROCEDURE SETUP_DROPDOWN_LISTS_PASSIVE_B IS BEGIN
  BEGIN
	DECLARE
	X ITEM;
	g number;
	BEGIN

    X := FIND_ITEM('SS_PASSIVE_VISITS.BADGE_TYPE');     g := populate_group('LISTITEM_PASSIVEBADGETYPES');     Populate_list(X, 'LISTITEM_PASSIVEBADGETYPES');

        END;
  END;
END;


The queries for the record groups are as follows:

LISTITEM_BODYLOCATIONS = SELECT LOCATION_ON_BODY L, LOCATION_ON_BODY FROM SS_BODY_LOCATIONS ORDER BY LOCATION_ON_BODY LISTITEM_PASSIVEBADGETYPES = select BADGE_description, TO_CHAR(BADGE_TYPE) BADGE_TYPE FROM SS_PASSIVE_BADGE_TYPES ORDER BY BADGE_DESCRIPTION The problem.


I want to dynamically change the elements in the list for item LOCATION_ON_BODY depending on what value has been selected for BADGE_TYPE. Initially (until I get it working) I am only using 1 trigger = WHEN_LIST_CHANGED trigger on BADGE_TYPE. When it works I will write a program unit and add it to the post_query trigger on thre datab lock as well.
The trigger says:



declare
	li item;
	x number;

begin
abort_query;
li := find_item('SS_PASSIVE_VISITS.LOCATION_ON_BODY'); clear_list(li);
x := Populate_group_with_query('LISTITEM_BODYLOCATIONS','Select Location_on_Body, Location_on_Body L from dcs_valid_badge_locations where badge_type = '||:ss_passive_visits.badge_type); Populate_list(li, 'LISTITEM_BODYLOCATIONS'); end;

The problem is that when I change the value of BADGE_TYPE, I get 2 error messages in a row :
"Error - Could not delete element from LOCATION ON BODY.
 Oracle Error No. 41331 - - 1403"

When this is acknowledged I get

"Error - Cannot populate the list from the record group.
 Oracle Error No. 41337 - - 1403" Received on Wed Aug 20 2003 - 09:16:40 CEST

Original text of this message