I am using If clause where I check for empty string and put -1 else trim the field.
If I use TrimLeadingTrailing(NulltoValue(field,-1)) I am getting an error while compilation saying that a composite call is not allowed.
Hence i am using If then else clause as below :
If TrimLeadingTraling(field)='' then -1 else TrimLeadingTrailing(field) ---
the issue with the above is that the part in the else clause is not functioning. The -1 is getting populated fine for a null but the trim part is not happening for not null fields. I have tried putting in stage variables and also used stripwhitespace and trim instead of Trimleadingtrailing. None is working.
Thanks Ray. Actually there is a Change data capture stage after the transformer stage, the link ordering was incorrect in that because of that I was facing the trim issue. This issue got resolved, but a new issue came up.