clearFieldsByName()

You can use the consoleLib.clearFieldsByName() system function to clear the specified on-screen fields. If you do not specify any fields, the function clears them all. The function does not affect any variables bound to the displayed fields.

The function is similar to consoleLib.clearFields(), except that it refers to values from the name properties of the fields rather than to the fields themselves. EGL requires this variant for compatibility with I4GL.

Syntax

  consoleLib.clearFieldsByName( 
    fields STRING in)
fields
A list of values assigned to name properties of one or more ConsoleField variables, separated by commas.

Example

The following example shows the consoleLib.clearFieldsByName() function:

Record Form_1 type ConsoleForm
  {formSize = [24, 80]}
  * ConsoleField {
    position = [2,2], 
    value = "Customer Number" };
  custNum ConsoleField {
    name = "Customer", 
    position = [2,20], 
    fieldLen = 10, 
    dataType="int"};

  * ConsoleField {
    position = [3,2], 
    value = "Customer Name" };
  custName ConsoleField {
    name = "Name", 
    position = [3,20], 
    fieldLen = 25, 
    dataType="char"};
end
...
  myCustForm Form_1;
  consoleLib.clearFieldsByName("Customer", "Name");

Feedback