6 Replies Latest reply on Oct 8, 2014 12:08 PM by philmodjunk

    Dialog box that shows processing in progress

    miw

      Title

      Dialog box that shows processing in progress

      Post

      I have a script that results in the filtering and sorting of a large amount of information and portal refreshing.  The process can take quite a bit of time (a few seconds to up to 30 seconds or so).  While the process is underway, there is no real way of knowing it is continuing and the user may try to undertake activities before the processing is complete.  Is there a way to script a dialog box while this process is ongoing to show that the system is "thinking" or processing without interrupting the process itself and then close itself when done?  For example, as the process is underway, it would be great to show a dialog box with a timer or just the fact that "...processing in progress...".

       

        • 1. Re: Dialog box that shows processing in progress
          philmodjunk

          New Window in combination with Go To Layout can be used to open and display such a message. Close window can then close such a window when your script completes.

          But a script that "does a lot of portal refreshing" also sounds like a script where it might be possible to produce the same result by much more efficient means.

          • 2. Re: Dialog box that shows processing in progress
            miw

            A new window makes sense - was hoping to somehow leave it limited to the more simple dialog box while the process was in progress.  I am intrigued by your comment about more efficient means - what do you have in mind?

            • 3. Re: Dialog box that shows processing in progress
              MarcoBrandao

              I found an article about a simple progress bar in Filemaker, give a look a maybe it can help you.

              ProgressBar (steps; value)

              https://www.briandunning.com/cf/1545

              • 4. Re: Dialog box that shows processing in progress
                philmodjunk

                I'd need a better understanding of what you are trying to do with your script to be able to offer specific suggestions.

                Generally speaking, you can often pull up the portal's records and process them on a layout based on the portal's layout rather than having the script interact with a portal.

                And if you have a filtered portal and need the portal to refresh after changing data used in the portal filter expression, there are usually ways to do that without needing to use Refresh Window [Flush Cached Join Results].

                • 5. Re: Dialog box that shows processing in progress
                  miw

                  First, I have a find function using global fields as the find parameter.  For example, I want to search the Inventory::Gem field for any gem that contains a "m" anywhere within the name.  So I have a Global::FindGem global field in which I can type "m" for the find.  A portal then filters the following:  If(Global::FindGem = "";IsEmpty(Global::FindGem ); PatternCount (Inventory::Gem; Global::FindGem )) so that the portal only shows Gems with an "m" (or any other parameter entered in the Global::FindGem field).  Multiply this type of find by 20 or so possibilities. 

                  I also have a dynamic ability to sort the portal as well based on variable global inputs on which fields to sort by.  So the portal is fairly complex for both filtering and sorts.  When I do the "find" as noted above for filtering, a script does some minor and quick housekeeping items and then take the twenty or so possible filters to perform a find and then the portal does the sort based on the dynamic fields to be sorted.  One of the last scripts to the step is Refresh Window [Flush Cached Join Results].

                   

                  • 6. Re: Dialog box that shows processing in progress
                    philmodjunk

                    For example, I want to search the Inventory::Gem field for any gem that contains a "m" anywhere within the name.  So I have a Global::FindGem global field in which I can type "m" for the find.  A portal then filters the following:  If(Global::FindGem = "";IsEmpty(Global::FindGem ); PatternCount (Inventory::Gem; Global::FindGem )) so that the portal only shows Gems with an "m" (or any other parameter entered in the Global::FindGem field).  Multiply this type of find by 20 or so possibilities.

                    This isn't really a "find" and it's very slow compared to other options, such as performing an actual find on a layout based on inventory using *m* as the search criteria to find all records where the field contains an m in it.

                    And sorting such a found set of records from an actual find will also be far faster than a dynamically sorting portal.