1 Reply Latest reply on Apr 12, 2010 7:21 AM by comment_1

    Force field re-index



      Force field re-index


      Is there a way to force FMP or FMSA to re-index a field?


      We have FMSA 9 and FMP 10 clients. (Currently upgrading to 11 but need to but a new server machine for the server side).


      I have a relationship that shows me a collection of values from within the lats year so I can produce an average value for with in the last 12 months.


      Unfortunately to do this I had to base the relationship on two fields, one of which was a calculation (at least I couldn't think of another way). Thus the calculation must be indexed.


      Sadly the calculation value changes every day and so before long the returned records go funny - once the index is out of date.


      Is there a smarter way to do this or can I schedule a script to force a re-index once a day?



        • 1. Re: Force field re-index

          Your description is not clear enough. It seems you have an unstored calculation on the child side of the relationship. This won't work.


          If I understand correctly, the calculation checks if the date is within the last 12 months? If so, the solution is to move the calculation to the parent side of the relationship, and use only the (stored) date on the child side - for example:


          Parent::cYearAgo < Child::Date


          where Parent::cYearAgo is an unstored calculation of current date minus 12 months.