You are viewing the documentation for Blueriq 15. Documentation for other versions is available in our documentation directory.

FIRST


Returns the first character(s) of a string, based on the number of characters you specify.


Syntax

FIRST integer CHARACTERS OF string
FIRST CHARACTER OF string



Inputs
  • integer - A positive integer value. This can be either an attribute of base type integer, an expression that results in an integer or a constant integer value. FIRST CHARACTER OF can be used to retrieve only the first character of the string.
  • string - An attribute of base type string, an expression that results in a string or a constant string value.


Return type

  • string

If you prefer a functional syntax, you can use the STR_FRONT( string, integer ) function. Example: STR_FRONT("Blueriq", 3) = "Blu"


Examples

Entity.attributeValueType
File.name"Thisfile_1.doc"String
File.prefix8Integer
ExpressionAlternative syntaxResultType
FIRST File.prefix CHARACTERS OF File.nameSTR_FRONT( File.name , File.prefix )ThisfileString
FIRST CHARACTER OF File.nameSTR_FRONT( File.name , 1 )TString
FIRST 5 CHARACTERS OF "pieceofcake"STR_FRONT( "pieceofcake" , 5 )pieceString


Back to Top