Issue with Part Selection from NC machine to NC Machine

Hello, I have the following problem:

  1. I have two NC Machines that feed product to another NC Machine via a Transfer Robot to 'Machine 3'

     

     

  2. The part that has been waiting the longest to leave the either Machine 1 or Machine 2 should be selected by the transfer robot and move to 'Machine 3'
  3. I have tried every Selection Criteria in Flow Mode In and Flow Mode Out but I still cannot get the model to perform as expected

Any guidance that anyone could provide? does this need logic written for it?