Need help to update a text item in forms through a procedure in a library.

From: Oraconfused <ridgewaybc_at_aol.com>
Date: 24 Apr 2003 09:20:56 -0700
Message-ID: <ca440bf6.0304240820.29b5ec9b_at_posting.google.com>



I have this procedure which updates a text item (display item)at the top of my screen. It is supposed to change the color of the field, and update the information in the text box according to certain properties of a record that is in the database. For example, if an address record is in Washington, then the banner should say 'A' and be green. If it is in Colorado, then the banner should say 'B' and be blue.. and so on....If a state has multiple regions, then I have to format to show only the first two, and then the user can click on an outside editor box to see the rest. (that works okay - values and all show up correctly.)
The colors change on the item, but the text does not - it only has the 'A' value in it, but the color is blue - so the values are being passed into the visual attributes, but the text values are not. I have tried pre-query and post-query triggers to set the values that way, but it still does not work.
Here is a snip of my code that has the main procedure in it.

PROCEDURE update_state_banner
IS
max_chars number := get_resized_display_chars; text_item_name varchar2(75);

BEGIN
-- 'control.state_info is my text_item_name
text_item_name := 'control.state_info';

  • a funct to get the region info based on the record content.

get_state_info;

  • If a state has more than one region id, then format it here. rid = region id

if (length (formatted_rid) > (max_chars - 2)) then text_item_name := substr (formatted_rid, 1, max_chars -2)||'->'; else
text_item_name := formatted_rid;
end if;
set_visual_attribute (rid, n_merge_comp); END update_classification_banner;

It updates the colors based upon the record content, but the text is not updating at all...
Any suggestions?
Thanks in advance
C Received on Thu Apr 24 2003 - 18:20:56 CEST

Original text of this message