Page 1 of 1

Hello OR logic in transformer Stage

Posted: Tue Oct 12, 2004 2:13 am
by sushanth
Hai I need to change derivations in Transformer stage from OR logic to IF then Else if ,for the following Logic help
If IsNull(Tocl1) Or Len(Tocol1) = 0 Then 'sample' Else To col1



Yours

Re: Hello OR logic in transformer Stage

Posted: Tue Oct 12, 2004 2:24 am
by sanjay
if IsNull(Tocl1) Then 0 else if
Len(Tocol1) = 0 Then 0 else
col1

Thanks


sushanth wrote:Hai I need to change derivations in Transformer stage from OR logic to IF then Else if ,for the following Logic help
If IsNull(Tocl1) Or Len(Tocol1) = 0 Then 'sample' Else To col1



Yours

Posted: Tue Oct 12, 2004 3:23 am
by richdhan
Hi Sushanth,

Just go ahead and change the derivation using the expression editor. If something is wrong it will appear in RED. Whatever logic you would like to apply just put it in the derivation using the expression editor. It should work.

HTH
--Rich

Pride comes before a fall
Humility comes before honour

Re: Hello OR logic in transformer Stage

Posted: Tue Oct 12, 2004 3:09 pm
by ray.wurlod
sushanth wrote:Hai I need to change derivations in Transformer stage from OR logic to IF then Else if ,for the following Logic help
If IsNull(Tocl1) Or Len(Tocol1) = 0 Then 'sample' Else Tocol1
Why do you need to change? The logic you have will work perfectly well.

Posted: Wed Oct 13, 2004 1:14 am
by sandy
Hi,

OR logic is not working as expected in the transformer and hence recently even we had to change all the OR conditions to If Then Else in the transformers. I think Sushant is also a victim of this issue.

Thanks

Posted: Wed Oct 13, 2004 3:04 pm
by ray.wurlod
The site I'm on at present isn't using PX, so I can't verify your claim. I trust you've reported it to Ascential?

Posted: Wed Oct 13, 2004 9:17 pm
by vmcburney
What you have is the old Oracle NVL function, if a value is empty or null replace it with a given value, else leave it alone. Why not write your own routine to do this which is passed the field value and the replacement value. In a routine you can use the Test button to make sure your code works and then use it in all your jobs. When you want to change it you only need to change it in one place and you do not need to recompile any jobs.

OR Logic

Posted: Wed Oct 13, 2004 10:45 pm
by sushanth
sandy wrote:Hi,

Yah you got it It happened like that
Thanks