0 Replies Latest reply on Mar 22, 2010 6:19 AM by LeoB

    Commit Record/Refresh Window issue (again)

    LeoB

      Title

      Commit Record/Refresh Window issue (again)

      Post

      I have a Main Menu layout based on the primary table in the file for navigation and notification.  Of the 21 buttons on the Main Menu that go to various layouts, 9 of them have related fields that show the number of records in the button category.  Of those 9 fields, 4 of them are based on records in another subsidiary table related to the table that the Main Menu is based on.

       

      All layouts have a scripted button to return to the Main Menu.  The script includes the Find function to update the global fields on the related subsidiary table for these four fields, then goes to the Main Menu.  The Find function properly updates the global fields immediately.

       

      On the Main Menu there is a script that runs OnLayoutLoad that performs the find function for the other 5 fields and inserts the value in global fields within the primary table.  All of this works perfectly.

       

      The problem is that when the Main Menu loads, it does not immediately reflect any changes made in the 4 subsidiary table global fields.  However, when clicking on the button to go the layout, the changes are there and when returning to the Main Menu from that layout the changes are then properly shown.

       

      I have tried about a thousand things to make this work, but have been unsuccessful.  These include:

       

      • Setting a global field in the primary table from the results of the find in the subsidiary table
      • Inserting Commit Record steps in the script after every find function
      • Inserting Refresh Window steps in every possible location in the scripts
      • Having the contents of the global field in the subsidiary table automatically inserted as a calculated value in a related global field in the   primary

      I've read all the posts in the forum that I can find about this, and it seems that committing a record does not actually refresh as soon as one would think.  When a record is changed in the subsidiary table and I go to the table view I can see the global field is immediately updated once the script is run, but then when going to the Main Menu that change is not reflected UNTIL I navigate to the layout and then back to the Main Menu, when it is correctly reflected.

       

      Since the find functions are performed before navigating to the Main Menu, I would think that the Main Menu layout, with the global fields that are on the subsidiary table, would then display the current contents, but they don't.

       

      I put a refresh window button on the Main Menu, but that does not change the value until I navigate to the layout and then back to the Main Menu.

       

      Any ideas out there?

       

      Thanks.