Hi everybody,
I have a class called Global Editor. This class allows to make replacements of different kind: Field with value, Field with content of another field, swap fields, delete group of records.
If the user chooses the second option, I check, that field type and replacement field (or combination of fields) are the same type using type function.
Unfortunately, as I just found, type doesn't return correct results, if UDF is used, e.g.
type("trimzero('00034')") returns U, while vartype(trimzero('00034')) returns C (trimzero is custom function, which removes leading 0s).
So, what would you suggest me to do? I didn't want to use vartype, because it may throw an error, if the expression is incorrect...
Thanks in advance.
If it's not broken, fix it until it is.
My Blog