4 Replies Latest reply on Jan 23, 2014 8:42 AM by philmodjunk

    Moving from IWP to Web Direct

    schmity

      Title

      Moving from IWP to Web Direct

      Post

           Im testing one of our databases that currently runs in IWP..  The employees that use it view it in list view, due to the 3000+ records that are in it at any one time.

           The 25 record limitation for IWP worked out well.  It was very responsive. Now testing it with Web Direct, it is VERY slow since (I assume) it tries to load all the available records at once and is constantly refreshing.  (Everything works fine with the file maker client).

           Is there a way to limit this to 25 records like in IWP? 

        • 1. Re: Moving from IWP to Web Direct
          davidanders

               I would suggest joining the developer forum for free here   https://fmdev.filemaker.com/login.jspa

               These are the links about WebDirect I have collected.

          FileMaker 13 WebDirect Overview and Optimization Presentation - YouTube

          What is FileMaker WebDirect? - Cimbura.com, Inc. Tech

          • 2. Re: Moving from IWP to Web Direct
            philmodjunk

                 It would be possible to script your own 25 record limit so that you get the same behavior as was "built in" in IWP.

            • 3. Re: Moving from IWP to Web Direct
              schmity

                   How would I go about writing a script like that?

                   Would I be able to apply it only when people are using web direct or would it have to affect everyone (file maker pro clients included)? 

                   If it would have to affect everyone, could I limit it to only one layout? 

              • 4. Re: Moving from IWP to Web Direct
                philmodjunk

                     I'm assuming that if your find returns 300, records, the user will want to view all 300, but 25 at a time.

                     Set up this self join relationship between your layout's table and a new table occurrence of the same table:

                     YourTable::GlobalIDField = YourTable2::IDField  --> IDField should be your primary key field, an auto-entered serial number or UUID.

                     Define a summary field, sIDList,  in YourTable and select the new "List of" summary field option and set it to list IDField.

                     After your find, your script would do this:

                     Set Variable [$$IDList ; value: YourTable::sIDList ]
                     Set Variable [$$K ; value: 1 ]
                     Set Field [YourTable::GlobalIDField ; MiddleValues ( $$IDList ; $$K * 25 - 24 ; 25 ) ]
                     Go To Related Record [Show only related records; From table: YourTable2; Using layout: <CurrentLayout> ]

                     A button to see the next 25 records would be:

                     Set Variable [$$K ; value: Min ( $$K + 1 ; Ceiling ( ValueCount ( $$IDList / 25 ) ) ]
                     Set Field [YourTable::GlobalIDField ; MiddleValues ( $$IDList ; $$K * 25 - 24 ; 25 ) ]
                     Go To Related Record [Show only related records; From table: YourTable2; Using layout: <CurrentLayout> ]

                     The previous 25:

                     Set Variable [$$K ; value: Max ( $$K - 1 ; 1 ]
                     Set Field [YourTable::GlobalIDField ; MiddleValues ( $$IDList ; $$K * 25 - 24 ; 25 ) ]
                     Go To Related Record [Show only related records; From table: YourTable2; Using layout: <CurrentLayout> ]