5 Replies Latest reply on Sep 24, 2010 8:09 AM by philmodjunk

    Field type change problem

    id21

      Title

      Field type change problem

      Post

      We have changed a few fields from type calculation to type text with auto calculated value box checked and encountered the problem with one of the fields, which seem not to be updated correctly and caused the commit (save) process to hang. We had to force quit the application, verified the database file through FM Server console, and there seemed to be no errors.

      However, there is something wrong, I will try to describe the problem. When we tried to do the search through another field from the same file, it was running too long, without result and only by some values. By some other values, the search run quickly. Also, we opened manage database and hit ok, without any actual changes, and the database hanged. Now, the fmserverd process on the server is eating all the CPU on the server. 

      It seems like there is problem with indexes, or that they are being rebuilt.

      Hope it's clear enough. Any ideas, please?

      Thanks,

        • 1. Re: Field type change problem
          philmodjunk

          Data fields with auto-enter calculations will not update correctly if one of the values referenced comes from a field in a related table if that is the value that is being updated. That might explain why it's not updating correctly. You'd need to either return it to a calculation type or use a script trigger set on the referenced field to run a script to update your calculated field's value each time it is changed.

          Any searches being performed that take extraordinary lengths of time are usually due to referencing a field that is unstored, from a related table or which has a corrupted index.

          If you think you have a corrupted index, you can save a copy of your file with the clone option and then import all your data into this clone. The import process will rebuild the indexes of all your fields during import. You can also turn indexing off for a field, exit manage database, then return and turn it back on to rebuild the index of just one field--the trick here is to correctly figure out which field's index to rebuild.

          • 2. Re: Field type change problem
            id21

            We returned the field back to the calculation type, and rebuilt the index, by switching it off and back on. Now seems to be working ok, searches are fast, no more hanging.

            Thanks a lot Phil.

            • 3. Re: Field type change problem
              LaRetta_1

              If you have FM Advanced, you can also run File > Recover and go to Advanced features (added new in vs. 10 I think).  Specify 'Copy File Blocks as is' and uncheck everything except 'Rebuild Indexes now.'

              Using Copy File Blocks as is would be the only way I would suggest re-using a file which has been recovered.  But this is a quick way to rebuild indexes on all fields.

              • 4. Re: Field type change problem
                id21

                Thanks LaRetta, good to know.

                • 5. Re: Field type change problem
                  philmodjunk

                  Ditto and a thumbs up.