A script-enabled browser is required for this page to function properly.

SRW.SET_FIELD_CHAR built-in procedure

This procedure sets the value of a character field. This is useful when you want to conditionally change a field's character value.

Syntax


SRW.SET_FIELD_CHAR (object_id,text CHAR);
 

Parameters

Description

object_id

Is always 0. (The object must always set its own attributes.) 

text

Is the character string you want the field to display.

Restrictions

SRW.SET_FIELD_CHAR is only meaningful in the format trigger of a field of data type CHARACTER. It has no effect when entered in other places.

Example

Suppose you want to conditionally change the value of a CHARACTER field, based on each employee's salary. In the format trigger for the field, you could type the following:

FUNCTION CHGFIELD RETURN BOOLEAN IS 
TMP NUMBER;
 BEGIN 
  if :sal >= 2000 then 
  tmp := :sal * 1.08; 
  SRW.SET_FIELD (0, tmp); 
 else 
  SRW.SET_FIELD (0, 2500); 
 end if; 
 RETURN (TRUE);
END; 

See also

About the Reports Builder built-in package (SRW)

SRW built-in package