Przejdź do głównej zawartości

FindNextNumberByDate()

A FindNextNumberByDate() function returns a number for the given type of cases, search key and date.

FindNextNumberByDate(NumberType,SearchKey,DateValue);
  • NumberType – (String) an identification key of autonumbering (a type of cases);
  • SearchKey – (String) a key for which numeration is created;
  • DateValue – (DateWithTime) a date for which the unique number is registered.

This function returns String. The FindNextNumberByDate() function returns string with a next number. If there is no space for the next number, ex. there are registered numbers „1” and „1A” and a new one should be inserted between them, then function will return ’nospace’ text.

The function will return a next number for „DocumentTypeA” type of cases for the given [Employee] and [Registration date]. If there aren’t cases with later dates then the function will return the next number. If there are cases with later dates the function will return the number from the previous case with a next letter (ex. „1A”).

[Number] = FindNextNumberByDate("DocumentTypeA",[Employee],[Registration date]);