if i use substr to simply show the first 20 chars of an address, =substr(Address,20) its fine as long as the address is longer than 20 chars and isnt null, but delivers errors if the address is either short or null
2 Answers, 1 is accepted
0
Svetoslav
Telerik team
answered on 25 Jun 2008, 08:17 AM
Hello Kevin,
The current implementation of Substr() built-in function is based on System.String.Substring() method without performing any additional validation of the input data, which happens to be the problem in your case. I have logged this issue in our bug tracking system and it will be fixed in the next version scheduled for the end of July. We have updated your Telerik Points.
Fortunately you can use your own custom substring function, where you can handle all the exceptional situations and prevent any errors. For more information on the user defined functions, please see Using Expressions.