GetLastNumber()

A GetLastNumber() function returns the last number generated for the given type and key.

Syntax

GetLastNumber(NumberType, SearchKey);

Function arguments

  • NumberType – (String) an identification key of autonumbering (a type of cases);
  • SearchKey – (String) a key for which numeration will be returned.

Return value

This function returns String. The GetLastNumber() function returns a string with the last number.

Examples

Example 1

The function will return the last number generated for „DocumentTypeA” and a value from [Employee] field and will compare it to a number from the current case from [Number] field.

if(GetLastNumber("DocumentTypeA",[Employee]) == [Number])
{
  // do something
}