This function checks to see if its first argument is an error string. If the value isn't an error string it is returned as-is, otherwise a replacement value is returned.
When using this function it is important to understand the difference between and error value and an error string.
Please see the topic Info: Error Value And Error String for more information.
IfErrorString([Primary Value], [Error Replacement Value])
Where:
Primary Value is the value to check for an error.
Error Replacement Value is the value to use if the primary value is an error.
Rule | Meaning |
---|---|
IfErrorString(DWVariableTableValue,100) | Will return 100 when the value coming from the variable TableValue is an error string. |
IfErrorString(DWVariableDatabaseValue,"Check Database") | Will return Check Database when the value coming from the variable DatabaseValue is an error string (#DBCONNECT!). |