5 Replies Latest reply on Mar 23, 2011 10:37 AM by philmodjunk

    Global Field Saving Values in Hosted Enviornment

    RestaurantCharlie

      Title

      Global Field Saving Values in Hosted Enviornment

      Post

      I have created several global fields to store selected values to act as filters in reports.

      For example, a Global Starting date and a Global End Date for a report.

      Our solution is hosted on FMS 11.

      I noticed that when I closed and open the file, the first values I put in the fields to run my tests, always show up. Even if I change the values of the fields, close the fiile, open it again, the same values are there.

      Yes, this is common behavior for global fields. They retain the last value that was in them when the file was not shared.

      But:

      1) the fields were created when the file was being shared

      2) I stopped sharing the file, opened it exclusively, and for some reason it doesn't let me in to the field to change it (Field Entry/Browse Mode/Checked). So I wrote a quick script to set the value of the fields to: "".

      I started the file on FMS again and it seemed fine, no values were set as default for those fields.

      BUT THEY ARE BACK. Nobody but myself has access to FMS to stop the sharing of the file to open it and change these values.

      ANY IDEAS on what could be causing this?

      I have an idea for a practical fix: include a  (SET FIELD GLOBALDATE; "") script step. But I'm worried there is a deeper issue that needs attention and it might come back later as a stronger more complicated problem.

        • 1. Re: Global Field Saving Values in Hosted Enviornment
          philmodjunk

          1) Doesn't matter. That's still how globals work in a hosted environment

          2) You'll need to do some investigating. Look for scripts and auto-entry settings on these fields that may alter the field values after you open the file. Make sure that global storage has actually been selected for each of these fields. They don't change their values on their own so something is changing the value.

           it doesn't let me in to the field to change it.

          Enter layout mode, select this field and then ungroup the field to remove any button settings. Setting it up as a button would prevent you from entering this field. So would removing the field from the tab order, then placing a transparent object on top of the field, formatted as a button. If all else fails, enter layout mode and add a new copy of the field to the layout and try to edit it.

          Using a script to set the values of the global fields that runs when the file is opened is an excellent way to make sure that they always have the correct initial values, but since we don't know what is going on here, the script could set the correct value, but then this other factor could still kick in and modify it's value after the fact.

          • 2. Re: Global Field Saving Values in Hosted Enviornment
            RestaurantCharlie

            "Enter layout mode, select this field and then ungroup the field to  remove any button settings. Setting it up as a button would prevent you  from entering this field. So would removing the field from the tab  order, then placing a transparent object on top of the field, formatted  as a button. If all else fails, enter layout mode and add a new copy of  the field to the layout and try to edit it."

            -PhilModJunk

            Worked like a charm.

            I closed the file on FMS and opened the file directly from the root directory, I was able to enter the fields and set them to "" (nothing).

            Reopened the file in FMS and the fields would show up blank as they should. After a little while, again the fields would be populated. I went through my startup script in debug mode. Those fields aren't touched. I also had the data viewer open watching those fields. As soon as FMP validates the username and password, the fields have values.

            What the heck am I missing?

            • 3. Re: Global Field Saving Values in Hosted Enviornment
              philmodjunk

              I also suggested checking any auto-enter options on the fields...

              • 4. Re: Global Field Saving Values in Hosted Enviornment
                RestaurantCharlie

                You are right, I forgot to mention that. Also checked those settings, no auto-enter options on those fields.

                • 5. Re: Global Field Saving Values in Hosted Enviornment
                  philmodjunk

                  You've got something in place that modifies the field values. Make a database design report and search it for all instances of these global fields and see what you find. I suspect that a script trigger somewhere may be modifying the values for you.