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

SRW.SET_FIELD built-in procedure

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

Syntax


SRW.SET_FIELD (object_id, text CHAR | number NUM | date DATE);
 

Parameters

Description

object_id

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

text
number
date

Is the character, number, or date string you want the field to display.

Usage notes

Example

Suppose you want to conditionally change the number of a 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