Question

Trying to all extract closed work order within a 45 day time frame.


Badge

Having issues with info being extracted into the CLOSED 45 DAY attribute-that is created with the ATTRIBUTE CREATOR. Thanks for all recommendations.


8 replies

Userlevel 3
Badge +26

If you are needing the date of 45 days prior to COMPDTTM, you can use the following:

@DateTimeAdd(@Value(COMPDTTM),-P45D)

 

Badge

If you are needing the date of 45 days prior to COMPDTTM, you can use the following:

@DateTimeAdd(@Value(COMPDTTM),-P45D)

 

In Attribute Creator, I add @DateTimeNow(@Value(COMPDTTM),-P45D) since I needed on todays date-45days from the COMPDDTM column. But none of the attributes are coming over to output CSV. Any suggestions

Userlevel 3
Badge +26

In Attribute Creator, I add @DateTimeNow(@Value(COMPDTTM),-P45D) since I needed on todays date-45days from the COMPDDTM column. But none of the attributes are coming over to output CSV. Any suggestions

I'm not sure I fully understand. Do you want to filter the entries in the CSV that are within the 45 days prior to today's date?

Badge

Yes, I need all of the closed work order from todays date within the 45 days timeframe using COMPDTTM. Yes I do.

Userlevel 3
Badge +26

Yes, I need all of the closed work order from todays date within the 45 days timeframe using COMPDTTM. Yes I do.

Instead of an AttributeCreator, use a TestFilter with this test condition. This will also take into consideration the Closed status, so you could remove the first TestFilter.

@DateTimeAdd(@DateTimeFormat(@DateTimeNow(),%Y%m%d),-P45D) <= @DateTimeFormat(@Value(COMPDTTM),%Y%m%d)
 
AND
 
@Value(COND) = CLOS

imageimage

Badge

Instead of an AttributeCreator, use a TestFilter with this test condition. This will also take into consideration the Closed status, so you could remove the first TestFilter.

@DateTimeAdd(@DateTimeFormat(@DateTimeNow(),%Y%m%d),-P45D) <= @DateTimeFormat(@Value(COMPDTTM),%Y%m%d)
 
AND
 
@Value(COND) = CLOS

imageimage

Any other suggestions, I did the modifications as listed previously. But wasn't able to run the model.

Userlevel 3
Badge +26

Instead of an AttributeCreator, use a TestFilter with this test condition. This will also take into consideration the Closed status, so you could remove the first TestFilter.

@DateTimeAdd(@DateTimeFormat(@DateTimeNow(),%Y%m%d),-P45D) <= @DateTimeFormat(@Value(COMPDTTM),%Y%m%d)
 
AND
 
@Value(COND) = CLOS

imageimage

@jamesb16​ Ahh, my apologies. I had an error in my code. Correction is below.

@DateTimeAdd(@DateTimeFormat(@DateTimeNow(),%Y%m%d),-P45D) <= @DateTimeFormat(@Value(COMPDTTM),%Y%m%d)
 
AND
 
@Value(COND) = CLOS

 

 

 

Badge

Not a problem. Ran good with no errors, however all of the data were placed in <unfiltered> instead of <closed 45 days> . Any suggestion on what to look for, should I create a tester for just the CLOS (so it could filter those all those CLOS) prior to the TesterFilter and get rid of the AND clause that looks for the CLOS.

Reply