Unable to set correct variable

Unable to set correct variable

I am stuck, and in need of some assistance please.
Line 5 ( VAR_Tool_State)  if I understand correctly should return the newest entry that meets the two criteria stated. 
However it is returning the FIRST entry made for the tool and serial number combination. 

Any ideas?

Support has access. 

  1. //ASSETS Current Location Lookup
  2. VAR_Location = Assets[(Part_Number == input.Part_Number && Serial_Number == input.Serial_Number)].Move_Asset_To;
  3. VAR_Assigned_To = Assets[(Part_Number == input.Part_Number && Serial_Number == input.Serial_Number)].Employee_ID;
  4. VAR_Tool_State = Assets[(Part_Number == input.Part_Number && Serial_Number == input.Serial_Number)].Checking_In_or_Out;
  5. if ((input.Checking_In_or_Out  ==  "Check Out")  &&  (VAR_Tool_State  ==  "Check Out"))
  6. {
  7.     input.CAT = VAR_Assigned_To;
  8.     input.Tool_State = VAR_Tool_State;
  9.     VAR_Whole_Name1 = Employee[Employee_ID == input.CAT].Whole_Name;
  10.     input.Current_Location = VAR_Location;
  11.     input.Assigned_to = VAR_Whole_Name1;
  12. }
  13. else
  14. {
  15.     input.Assigned_to = null;
  16.     input.Current_Location = null;
  17.     input.CAT = null;
  18. }

Jason Rapp