Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to create using advanced mode criteria where status equals active or status equals inactive and the closing date is less than or equal to today plus 30 days. this is what I have but it's not working....suggestions?
(
(input_row.status.equals("active"))
||
(((input_row.status.equals("inactive")) && (input_row.closing_dt<=TalendDate.ADD_TO_DATE(TalendDate.getCurrentDate(), "DD", 30)))
)
Error says 'insert ")" to complete ArgumentList
If the data type of input_row.closing_dt is Date type, try this expression:
(input_row.status.equals("active"))||((input_row.status.equals("inactive")&&(TalendDate.compareDate(input_row.closing_dt,TalendDate.ADD_TO_DATE(TalendDate.getCurrentDate(), "DD", 30))!=1)))
Thanks Shong! yes Closed_dt is a date field. Although i'm not getting the error when running any longer and it's able to run the filter as you have it now is not including any records that are 'active'. at the least on the table there are 1885 records where status = 'active', should i nest the && statements?
FYI Nesting the && statements didn't work, thoughts?
Yup sorry!
This is what I have now:
(input_row.STATUS.equals("active"))
||
(
((input_row.STATUS.equals("inactive")&&(TalendDate.compareDate(input_row.CLOSING_DT,TalendDate.ADD_TO_DATE(TalendDate.getCurrentDate(), "DD", 30))!=1)))
)
This image is the result i get when I run this subjob however in the table there are approx 1880+ 'active' records that should be going past the filter at the least.
I fixed syntax and it's running now however how it's not weeding out the inactive records that have a closing date greater than 30 days from today. records back with closing dates in 2012, 2013 are passing through the filter. Any suggestions are greatly appreciated!
Hi Shong, the second set of criteria should be STATUS = Inactive AND CLOSED_DT should be between TODAY and up to 30 days prior to today (so only loading inactive for records up to the last 30 days from today. ) THanks!