Chr Function


Returns the character value of a number.




number can be a constant, a numeric field, an expression that results in a number, or a function that returns a number. For predictable results, the number should be in the range 0-255 (the extent of the character set).

Return value

This function returns a string.

Calculated field example

If the Amount field contained the values 876.00 and ¥1022 (indicating an amount in Japanese yen), the following calculated field expression would return the string Dollars or Yen: If(Left(Amount,1)=Chr(165), "Yen","Dollars")

The first part of this expression - If(Left(Amount,1)=Chr(165) - determines whether the Yen symbol (character code 165) appears at the beginning of the Amount field. If it does, the first value "Yen" is returned, otherwise the second value "Dollars" is returned.

Filter/Find example

Records with an Amount field value beginning with the yen symbol (¥) can be selected or found using the expression: Left(Amount,1)=Chr(165)




© 2024 Altair Engineering Inc. All Rights Reserved.

Intellectual Property Rights Notice | Technical Support