3 Replies Latest reply on Mar 11, 2016 12:43 PM by isamudysan

# Warranty Status Calculation

The output of the Warranty Status is either IW (In Warranty) or OOW (Out Of Warranty) via a calculation.  Below is my calculation:

If ( Lookup ( cWOM ; WarrantyCal_VendorName::Date ) > Get ( CurrentDate ) ; "IW" ; "OOW")

I have a warranty calendar table with the following fields:  Date (not creation date), Month, Day, Year, OOWWorkweek, OOWYr, and OOWWOM.  WOM means Week Of Manufacture.  The WOM is a calculation field on my main table with the following calculation:  Middle ( SN ; 4 ; 3 ).

From the warranty calendar the only 2 fields of importance in determining whether a unit is IW or OOW is OOWWorkweek and Date.  The above IF statement works fine, except for the fact that when the WOM is 527+ the warranty status of the units are marked as OOW; and, they should in fact be IW.

I noticed that when looking up the source field (WOM) if the date is, e.g., 04/04/2016, then the unit is IW.  However, if the date for a given WOM is 527 and above, e.g., 01/01/2017, then the unit become OOW.  Again, that would be incorrect.  Shouldn't a date in  2017 be greater than a date in 2016?

My question would be how can this be resolved, or is there another way to rewrite this calculation.

Thank you.

isamudysan

• ###### 1. Re: Warranty Status Calculation

Your date fields should be field type of Date.  If the date field is not of type date then the calculation will be wrong.

• ###### 2. Re: Warranty Status Calculation

interesting.  so, what about a combining the Month, Day, and Year fields in a cDate field; and:

If ( Lookup ( cWOM ; WarrantyCal_VendorName::cDate ) > Get ( CurrentDate ) ; "IW" ; "OOW")

Would it be any different?  I'll try it and see how it goes.  appreciate your reply.

• ###### 3. Re: Warranty Status Calculation

schamblee, i cannot thank you enough...it was right there in front me and i can't believe this brain fart of mine. omg, i hate myself for not seeing it.  i do appreciate and thank you very much for your answer.  by changing the field type to Date solved this problem.