Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
rwnetwork
Creator
Creator

Cannot Boolean to Integer

Hi there,

Anyone know why this is error is occuring with my simple expression in my tmap?  I'm confused.  I have an integer input going to an integer output and it's bringing in an error about Boolean types?  I just want to return the date that is >= another date.  Please if anyone can help, I'm on a deadline.  Thank you Community!

0683p000009MZmq.png0683p000009MZmv.png0683p000009MZT1.png

Labels (2)
1 Solution

Accepted Solutions
akumar2301
Specialist II
Specialist II

Your expression returns a boolean ( >=) and then you joining it with an integer

You can try like ( syntax no correct)

(Minratedate >= miratedate) ? 1 : 0

View solution in original post

6 Replies
akumar2301
Specialist II
Specialist II

Your expression returns a boolean ( >=) and then you joining it with an integer

You can try like ( syntax no correct)

(Minratedate >= miratedate) ? 1 : 0
rwnetwork
Creator
Creator
Author

Thanks Abhishek!  Let me try this in my design.

It worked!  Thanks again.

 

rwnetwork
Creator
Creator
Author

Hi again,

I realized that this didn't work 100%.  This is what I'm using in my tmap, however, values returns are 0's and they are supposed to have dates.

Thoughts?

Anyone? Please and thank you.

 

0683p000009MZjZ.png

 

 

 

 

 

 

akumar2301
Specialist II
Specialist II

if you need date in integer format , you need to convert youe expressions output accordingly.

 

booleanExpression ? IfTrueExpression : IfFalseexpression

 

 

rwnetwork
Creator
Creator
Author

Thanks, so are you saying that I still need to convert the whole Boolean expression to my needed data type, which is integer?

makethisInteger(booleanExpression) 

 

akumar2301
Specialist II
Specialist II

check ternary operator documentation , you will get more idea .
Try this :
https://www.geeksforgeeks.org/java-ternary-operator-with-examples/