ReplaceError()

ON THIS PAGE:

Format

ReplaceError(Arg1)

Returns

Returns the value of Arg1, replacing any errors in the collection with the last known value, if possible.

Whenever the function finds an error in the collection, it will first look for the last known value which is not an error. 

  • If the function can find the last known value which is not an error, then it will replace the error with the last known value.
  • If the function cannot find a last known value, then it will look for the first known value (in the future) and replace the error with that.
  • If this search fails and a non-error value cannot be found in either direction, then it will replace the error with the following error:
    (“The source error value has been replaced with an error as no other non-error replacement value was found.”). The original error is retained as an inner exception, to assist with diagnosing issues.

Inputs

Arg1: The argument being checked for errors and lack of samples or data.
Behaviour: Required
Dimension: Collection
Valid data types: Null, Boolean, DateTime, Decimal, Integer, String, Duration, Error

How to format data types

 

Comments are closed