4 Replies Latest reply on Feb 27, 2012 1:52 AM by robwoof

    Which is the "Last" Repetition?

    robwoof

      I feel like I have missed something...

       

      I have inherited a FileMaker system that makes a lot of use of repeating fields. Some I have "normalised out" into related tables, and others I haven't gotten around to yet. In one of the remaining repeating fields, I want to insert a value into the next available repetition (due to careful training of users, the field in question is populated sequentially from repetition 1, so don't worry about that for now).

       

      Now I know the "Last ( <repeating field> )" gives you the value contained in the highest-number populated repetition, but is there a function that tells you the repetition number of the last-populated repetition?

       

      For example, if the 5-repetition field called "EnrolYear" contains the values 2008, 2009, 2010 and 2011 in the first four repetitions, Last ( EnrolYear ) returns 2011. But I want a function that returns 4, the repetition number that contains the Last value.

       

      I figured out a calc to do this (which I will share if anyone is interested), but is there a native Filemaker calculation that I have missed that does this job?

       

      Cheers,
      Rob