Page 1 of 1

IsNull( Trim( ....) ) in Constraint not able to compile

Posted: Thu May 22, 2008 11:28 am
by smeliot
Very simple job. Compiles and runs with IsNull( ...) in constraint (although doesn't give expected results).

When we add the Trim inside the IsNull function, we get the followng error when compiling:
##W IIS-DSEE-TOSH-00049 12:26:13(006) <main_program> Parameter specified but not used in flow: DSPXWorkingDir (DY005_MRG_ECC_CIS.Transformer_50)


Have changed to "IsNull( ...) Or ...=' '" but am wondering why IsNull( Trim( ...) ) isn't working. And whether or not we should go through the hassle of reporting the problem.

Any ideas?

Thanks.

Posted: Thu May 22, 2008 11:56 am
by kumar_s
Hi Welcome Aboard :D

What is the exact derivation given with Trim and isNull function. Is it just a field name? Doese the derivation gives the blue color after the edit or will it still give you red color for wrong derivation?

Posted: Thu May 22, 2008 12:00 pm
by smeliot
kumar_s wrote:What is the exact derivation given with Trim and isNull function. Is it just a field name? Doese the derivation gives the blue color after the edit or will it still give you red color for wrong derivation?
IsNull( Trim( ...) ) where ... = link.column

No red - which is why we were compiling.

Posted: Thu May 22, 2008 12:18 pm
by kumar_s
Other than the given warning, what other useful warning you get along with this?

Posted: Thu May 22, 2008 12:22 pm
by smeliot
kumar_s wrote:Other than the given warning, what other useful warning you get along with this? ...
Not a thing, sorry.

Posted: Thu May 22, 2008 1:09 pm
by wesd
Maybe because you can't Trim a null character? Did you try using TRIM(IsNull(in.ABC,0))?

Posted: Thu May 22, 2008 3:25 pm
by ray.wurlod
IsNull() returns a TinyInt, and Trim() can only be applied to a string. This is why it won't compile.

Trim() won't like NULL so you have to convert this null before the Trim() function is applied. IsNull() does not convert; it only reports. You need something such as

Code: Select all

Trim(If IsNull(InLink.TheValue) Then "0" Else InLink.TheValue)