Skip to main content

Hi,

 

 

I've just run into a curious problem with a conditional expression in the AttributeManager.?

 

 

I'm comnparing two dates in the "FME Date" format (%Y%m%d), setting an "expired" value to either "true" or "false" based on the conditional expression: @Value(dt1) > @Value(dt2)

 

 

But it seems like the expression is always satisfied, so my output is always "true", regardless of the values involved (and some should definitely yield "false").

 

 

As a workaround I added a Tester transformer, with the exact same expression, and that worked as expected.

 

 

Has anyone else run into this, or have any insight into why the conditional value errs ?

 

 

Cheers

Here's a sample workspace that illustrates the problem:

condional-value-error.fmw


Hi @lifalin2016, you have renamed "col2" to "CreatedDate" before setting "Expired".

"col2" has been missing after renaming, and a missing attribute will be interpreted as an empty string in test clauses. I think it's the reason why "Expired" became always "true".


Hi @lifalin2016, you have renamed "col2" to "CreatedDate" before setting "Expired".

"col2" has been missing after renaming, and a missing attribute will be interpreted as an empty string in test clauses. I think it's the reason why "Expired" became always "true".

Doh!

 

 

Grrr. Why in %¤#/& does it provide me with "col2" if it's renamed?? The value was inserted by simple point and click, so the interface is unfortunately not as user friendly as it ought to be.

 

 

Thanks Takashi.

 


Reply