2 Replies Latest reply on Oct 14, 2010 12:53 PM by GertvanOss

    Progress Monitor: problem window changes

    GertvanOss

      Title

      Progress Monitor: problem window changes

      Post

      Dear list,

      while trying to create a window that shows a Progress Monitor I'm running into a problem. The window keeps changing while I did put "Freeze Window" as a command.

      Am I doing something wrong here?

      Thanks for any reply.

      ------

      Go to Record/Request/Page [ First ]

      #Creating a Progress Monitor

      Set Variable [ $q; Value:Get(FoundCount) ]

      Set Variable [ $q_CountDown; Value:$q ]

      Set Field [ System::gProgressNo; $q_CountDown ]

      Set Field [ System::gTotal; $q ]

      New Window [ Name: "Processing: please wait..."; Height: 300; Width: 370; Top: Get(WindowTop)+120; Left: Get(WindowLeft)+350 ]

      Go to Layout [ “Layout #Progress Monitor” (Contacts) ]

      Freeze Window

      # Should Layout Progress Monitor not stay vissible during loop?  <<<----------

      Loop

      Set Variable [ $ID_myContact; Value:Contacts::kContactID ]

      #

      Go to Layout [ “Group Contacts Utility” (Groups_GroupContacts) ]

      New Record/Request

      Set Field [ Groups_GroupContacts::Contact ID; $ID_myContact ]

      Set Field [ Groups_GroupContacts::Group ID; $$ID_ChosenGroup ]

      Go to Layout [ “Record List Contacts” (Contacts) ]

      Set Variable [ $q_CountDown; Value:$q_CountDown-1 ]

      #

      Go to Record/Request/Page [ Next; Exit after last ]

      End Loop

        • 1. Re: Progress Monitor: problem window changes
          philmodjunk

          I ran your script on a test file using Filemaker 11 and Windows XP.

          Freeze Window worked and the flipping back and forth between layouts was hidden from the user.

          However, I have some questions:

          What layout is current when you start this script?

          What version of FileMaker are you using?

          Note: since $q_CountDown is a local variable, and you don't have a line in the above script to update the global field, you don't have anything in your script as posted, that would update any kind of count down in your new window.

          • 2. Re: Progress Monitor: problem window changes
            GertvanOss

            Thanks for the hints,

            to answer your questions: The script starts-up in the "contacts list layout" and I'm using FMP 11 (is there an easier way to do is in 11?). I now came up with something that seems to work, it is a long script (derived from the email-camp-management) that I'll try to paste in here. Thanks again.

            Gert

            • If [ not IsEmpty(Get(ScriptParameter)) ]
            • Perform Script [ “Clear Sort Indicator_Groups” ]
            • New Window [ Name: "Select a Group"; Height: 400; Width: 550; Top: Get(WindowTop)+(Get(WindowHeight)-400)/3*2; Left: 25+Get(WindowLeft)+(Get(WindowWidth)-550)/2 ]
            • Go to Layout [ “Pop up Sizing_Groups” (Groups) ]
            • Show/Hide Status Area [ Hide ]
            • If [ not TestForIWP ]
            • Adjust Window [ Resize to Fit ]
            • End If
            • Go to Layout [ “Select List - Groups | make selection Contacts” (Groups) ]
            • Halt Script
            • Else
            • Set Variable [ $$ID_ChosenGroup; Value:Groups::k_ID_Group ]
            • Set Variable [ $$ID_ChosenGroupName; Value:Groups::Group_Name ]
            • Close Window [ Current Window ]
            • End If
            • Constrain Found Set [ Specified Find Requests: Find Records; Criteria: Contacts::MarkTemp: “=1” ] [ Restore ]
            • Go to Record/Request/Page [ First ]
            • #Creating a Progress Monitor
            • Set Variable [ $q; Value:Get(FoundCount) ]
            • Set Variable [ $q_CountDown; Value:$q ]
            • Set Field [ System::gProgressNo; $q_CountDown ]
            • Set Field [ System::gTotal; $q ]
            • New Window [ Name: "Processing: please wait..."; Height: 300; Width: 370; Top: Get(WindowTop)+120; Left: Get(WindowLeft)+350 ]
            • Show/Hide Status Area [ Hide ]
            • Show/Hide Text Ruler [ Hide ]
            • Go to Layout [ “Progress Monitor Contacts” (Contacts) ]
            • Freeze Window
            • Loop
            • Set Variable [ $ID_myContact; Value:Contacts::kContactID ]
            • #
            • Go to Layout [ “Group Contacts Utility” (Groups_GroupContacts) ]
            • New Record/Request
            • Set Field [ Groups_GroupContacts::Contact ID; $ID_myContact ]
            • Set Field [ Groups_GroupContacts::Group ID; $$ID_ChosenGroup ]
            • Go to Layout [ “Record List Contacts” (Contacts) ]
            • Set Variable [ $q_CountDown; Value:$q_CountDown-1 ]
            • Set Field [ System::gProgressNo; $q_CountDown ]
            • #
            • Go to Record/Request/Page [ Next; Exit after last ]
            • Go to Layout [ “Progress Monitor Contacts” (Contacts) ]
            • Refresh Window [ Flush cached join results ]
            • End Loop
            • Close Window [ Name: "Processing: please wait..."; Current file ]
            • Go to Layout [ “Record Detail Groups” (Groups) ]
            • Show All Records
            • Perform Find [ Specified Find Requests: Find Records; Criteria: Groups::Group_Name: “=$$ID_ChosenGroupName” ] [ Restore ]
            • Show Custom Dialog [ Title: "Info"; Message: $q & " Contacts Added to Group: " & $$ID_ChosenGroupName; Buttons: “OK”, “Cancel” ]