1 Reply Latest reply on Nov 16, 2010 1:07 PM by philmodjunk

    Searching a calculation field

    Melinda

      Title

      Searching a calculation field

      Post

      I was just sent a new problem that I can't figure out...  a co-worker is trying to do a search in a database for all records showing a specific number in a specific field.  FM seems to freeze in the "Query in Progress" window, though I think FM is actually working, I can't figure out why it is taking so long...  I went into the database and determined that when the field was originally created it was created as a calulation field (which I have no idea why, it's not calculating anything) when it could have been a text or number field. Could this be why the search seems to run indefinitely?

      If I change the field type from a calculation field to a text or number field, will I lose the data that's there, or might it be reformatted?  I can't riskk osig what's there, so if I need a work around, I'd be grateful for a point in the right direction.

      Thanks,

      Melinda

      I'm using FMPro 9, Mac OSX.

        • 1. Re: Searching a calculation field
          philmodjunk

          Whenever you want to experiment with a real data base, use a back up copy so that even if everything goes wrong, your real copy is unaffected. Wink

          Sounds like your field is not only a calculation but one that is not indexed. Some calculations cannot be indexed because they refer to a global field or a field in a related table. If this is not the case, you can open the field's calculation and click storage options to turn indexing on.

          Performing a find on an indexed calculation field should go much faster for you.

          Another trick that is sometimes useful is to perform your find in two stages.

          1. Enter find mode and specify criteria only in local fields that are indexed
          2. perform the find
          3. Return to find mode and specify criteria in related fields and unindexed fields.
          4. Select Constrain found set to reduce your found set to just those records that match this second criteria.