GXMLines function

Official Content
This documentation is valid for:

Returns the number of lines occupied by a field, considering a numeric value.

Syntax

GXMLines(Character , Constant)

Where:

Character
    Specifies a long varchar, varchar or char field.

Constant
    Specifies a numeric constant.

Type Returned:
Numeric

Scope

Objects: ProcedureTransaction, Web PanelData Provider
Generators: .NET, .NET Framework, Java, Ruby (up to GeneXus X Evolution 3), Visual FoxPro (up to GeneXus X Evolution 3)

Description

Considering constant as the number of characters per line, it returns the number of lines occupied by the character field.

Notes:

  • The font used to display the fields must be non-proportional.
  • In order to use these functions the Knowledge Base “Functions” Property must be set with the value “Allows non-standard functions on saving”.

Samples

The following example shows how to print  the attribute attchar splited in lines of 40 characters each.

&nlin = GXMLines(attchar,40)

For &i = 1 to &nlin
    &txt = GXGetMLi(attchar,&i,40)
    Print txtLines // (print block that prints &txt)
EndFor

See Also

Knowledge Base Preferences
Functions that Manage LongVarchar Fields
GXGetMLi function