3 Replies Latest reply on May 15, 2012 1:04 PM by timwhisenant

    Advice: Changing a field to a global field

    m.bodily.consulting

      I have a few fields CheckinDate and CheckoutDate that already have data in the fields and I think my database would benefit from these fields being global fields (because I have multiple layouts and portals across 2 tables).

      What is the best way to update these fields to make them work globally but retain the data already in them?

      >> I was thinking I should duplicate the field, export the original field data and import that data into the new (global) field.

      But first I wanted to get advice/imput from other FM users and developers if there was another way about this, should I make a global variable of these fields instead? Do variables even function in the same way as fields? I am only vaugely familiar with the concept of global fields, variables, etc.

        • 1. Re: Advice: Changing a field to a global field
          ClayTarver

          A field that uses global storage contains one value that's used for all records in the file. (FM 11 Help)  Not sure that this is what you want.  What is your goal?

          • 2. Re: Advice: Changing a field to a global field
            m.bodily.consulting

            I have read up on global fields but I haven't fully grasped the actual practice of it. This is part of the reason I want advice before I waste hours playing around with the concept.

            My problem is that I have a field called CheckoutDate, this field is in a table I've named "Master." There are 5 layouts with the CheckoutDate (including 4 portals). The most obvious difference between these layouts/portals is that I have a button on 2 of the layouts which changes the value in the CheckoutDate field but they are triggered by 2 different scripts. My problem arises when I press the button on layout1 only some layouts/portals change the value accordingly. So something is not quite right in the calculation part of the script (right?) Wouldn't using a global field in these calculations help FM connect all 5 layouts instead of just 2 or 3?

            But maybe I'm looking at this problem wrong, is it just the scripts that cause this problem, or the underlying calculations, ooorr at the root of it, wouldn't it be the (lack of a) global field.

            Hopefully I've put things in a way that you can follow (I tend to write all over the place). I appreciate the advice in advance.

            • 3. Re: Advice: Changing a field to a global field
              timwhisenant

              Really hard to say, based on the information you have given. If you change the field to a global field all data in that field will be lost. Before I changed the field, I would add a “Commit Records/Requests” step at the end of each of the two scripts and see if that helps the situation.

               

               

               

              Tim