Re: Field Display Attributes in Form 3.0

From: Tommy Wareing <p0070621_at_oxford-brookes.ac.uk>
Date: 16 Sep 1993 11:02:28 -0500
Message-ID: <CDGF3z.Dz6_at_uk.ac.brookes>


Ron Loxton (loxtonr_at_govonca.gov.on.ca) wrote:

> Does anyone out there known if it is possible to change the attribute of
> a field (eg. make it blink or someother such thing) under Forms 3.0 when
> a certain condition is met for the data in the current record. I want to
> make a field flash if the current level of an item in stock is below a
> minimum stocking level. Right now it just displays a message at the
> bottom of the screen.

  Use the display_field procedure. Here's the routine we use to change an entire record (cut from the inp file):
NB. Our resource files DON'T have a bold attribute, hence the kludge.

    To determine what attributes are available, talk to your DBA.

NAME = indicate_row
DEFINITION = <<<
/*



Parameters are:
effect to be applied (defaults to BOLD)
block to be affected (defaults to block cursor *WAS* in when trigger
                      fired)
-------------------------------------------------------------------------
Suggested uses:
  PRE-RECORD & POST-RECORD triggers (highlight current record)   POST-BLOCK trigger (highlights record when cursor is not in block)

      (PRE-BLOCK trigger needed if not using PRE-RECORD trigger as well)

  • ----------------------------------------------------------------
  • CHANGE HISTORY:
  • Version DATE PERSON CHANGE
  • ------ ----------- --------------------------------------------- 1.1 18-5-1993 TW Parameters now default to NULL and are then changed. Avoids core-dumps. Bug #259210->258407 */ PROCEDURE INDICATE_ROW (attrib CHAR := NULL, cur_block CHAR := NULL) IS alt_block CHAR(40) := NVL(cur_block, :SYSTEM.TRIGGER_BLOCK); cur_field CHAR(80); attr CHAR(40) := NVL(attrib, 'BOLD'); BEGIN /* Fudge necessary attributes, since this is a mess at the moment */ IF attr = 'BOLD' THEN -- change attribute if needed attr := 'field-selected-current'; END IF; /* Walk through the fields in order, starting with the first one */ cur_field := BLOCK_CHARACTERISTIC (alt_block, FIRST_FIELD); WHILE cur_field IS NOT NULL LOOP cur_field := alt_block||'.'||cur_field; IF FIELD_CHARACTERISTIC (cur_field, DISPLAYED) = 'TRUE' THEN display_field (cur_field, attr); END IF; cur_field := FIELD_CHARACTERISTIC(cur_field, NEXTFIELD); END LOOP; END; >>>

> Also how do I stop the Please Ack. Message from appearing at the bottom
> of the form.

  go to Forms 4 :-) You can't avoid it in Forms 3.

> Thx

--
  _________________________   __________________________________________
 /  Tommy Wareing          \ /  In the beginning, there was The Bomb    \
|  p0070621_at_brookes.ac.uk   X   And The Bomb said "Let there be Light!"  |
 \  0865-483389            / \     - The Bomb, Dark Star                /
  ~~~~~~~~~~~~~~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Received on Thu Sep 16 1993 - 18:02:28 CEST

Original text of this message