OraFormsEditSet Function

Action

OraFormsEditSet allows you to set a new value to a text control. The control is identified by its unique name or unique ID. Text controls have a special behavior in Oracle Forms Applications. Whenever a control becomes dirty (a value is changed by the client), the control sends a dirty message to the server. This happens when entering the first character in the text control. The complete value is sent when the control loses its focus (e.g., using the tab key to jump to a different control or changing the focus by clicking another control).

OraFormsEditSet allows you to either use the default method of dirty value handling (using the first character of the entered value) or a different dirty value can be defined. A different dirty value as the first character can occur if the user pastes a new value into a control that already contains a different value.

OraFormsEditSet also allows you to completely omit sending a dirty value.

Include file

OraForms.bdh

Syntax

OraFormsEditSet( in sName :  string,
                 in sValue :  string,
                 in nOption :  number optional,
                 in sDirtyVal :  string optional ) :  boolean;

Return value

  • true

    if successful
  • false

    otherwise
Parameter Description
sName The unique name of the edit control.
sValue The new value that should be set for the control.
nOption

(optional):

There are two options for how the function should handle a dirty message that is sent when setting a new value to a text control:

  • ORA_EDIT_SEND_DIRTY (default):

    This option causes the function to send a dirty message with either the text defined in the parameter sDirtyVal or the first character of sValue if sDirtyVal is null or omitted.

  • ORA_EDIT_NO_DIRTY: No dirty value will be sent.
sDirtyVal

(optional):

If nOption is defined with ORA_EDIT_SEND_DIRTY, the function first sends a dirty notification to the server and then sends the real new value. By default, when recording an application, the dirty value is the first character of the new value that is entered in a text control. If sDirtyVal is omitted or null is passed, the first character of sValue will be sent as a dirty value. Otherwise the value defined in this parameter will be used.

Example

dcltrans
  transaction TMain
  var
    sValue :  string;
  begin
    OraFormsSetConnectMode(ORA_SOCKET_CONNECTION);
    // Connect - with connection properties
    OraFormsSetInt( "INITIAL_VERSION",  608);
    OraFormsSetPoint( "INITIAL_RESOLUTION",  96,  96);
    OraFormsSetPoint( "INITIAL_DISP_SIZE", 1024,  768);
    OraFormsSetInt( "INITIAL_COLOR_DEPTH", 256);
    OraFormsSetString( "FONT_NAME" , "Dialog" );
    OraFormsSetPoint( "INITIAL_SCALE_INFO",  8,  18);
    OraFormsSetBoolean( "WINSYS_REQUIREDVA_LIST",  false);
    OraFormsConnect( "server module=Person3.fmx userid= useSDI=yes record=names");
    OraFormsSetWindow( "Logon");
    OraFormsLogon( "user",  "password",  "orcl_server");
    // --- 
    // New window activated: WINDOW1 
    OraFormsSetWindow( "WINDOW1");
    OraFormsEditSet( "PERSON_FIRST_NAME",  "Andi");
    OraFormsKeyStroke( "PERSON_FIRST_NAME", ORA_KEY_TAB,  0);
    OraFormsEditSet( "PERSON_LAST_NAME",  "GRABNER", ORA_EDIT_SEND_DIRTY,  "Reithmayr");
    OraFormsMenuItem( "WINDOW1",  "Action::Exit");
  end TMain;