7 Replies Latest reply on Jul 19, 2013 9:30 AM by philmodjunk

    Auto-Scrolling Databases

    JordanSherrard

      Title

      Auto-Scrolling Databases

      Post

           Hey, 

           I have been approached by my boss to create a schedule for our office.  With the large amount of data on it, I need it to be able to auto scroll through the page to be able to show all the records involved.

           It will be placed on a TV screen which will have no useability on touch, etc. 

           Filemaker will just be displayed on this TV screen.  

           In theory I want it to almost work like a slide show and just have a time limit set say every 10 min it scrolls 10 customers.

           Is this possible?  How should my code look?

            

           Thanks for all the advice in advance.

        • 1. Re: Auto-Scrolling Databases
          philmodjunk

               It would depend on your layout design. A script could use Go To Record/Request/Page to go to a specific record number calculated to be 10 more records than the previous iteration.

               In other cases, it may work better to manipulate the found set to display 10 records at at a time and to bring up a different 10 with each subsequent interation.

          • 2. Re: Auto-Scrolling Databases
            JordanSherrard

                 It is in list form.  

                  

                 It will show in horizontal fashion the data.  Each Line is a new client.  Have up to 100 jobs ongoing at a time.

                  

                 If I wanted to scroll 10 at a time, what would my script look like?  Would I need to set up serial numbers? 

            • 3. Re: Auto-Scrolling Databases
              philmodjunk

                   You should not need serial numbers, but you'll need to carefully manage the records that make up this display and keep track of which portion of the total is currently visible.

                   Will new records be added to the display due to a change in status or because they have just been created?

                   Will records drop off the display due to a status change?

                   Is there a specified order to the records other than the order they were created or where added to a found set of displayed records?

                   I hadd a nagging recollection that there was a scroll window script step. I checked and there is. You can use it to script a page down, page up, home and end action on your window. Thus, you might set up a script like this:

                   If [$$PageCount < Ceiling ( Get ( FoundCount ) / 10 ]
                      Scroll Window [Page Down]
                      Set Variable [$$PageCount ; Value: $$PageCount + 10 ]
                   Else
                      Scroll Window [ Home ]
                      Set Variable [$$PageCount ; Value: 1 ]
                   End If

                   You can use the Install OnTimerScript script step in a separate script to perform this script on a regular interval.

                   But you may need to add additional scripting to handle events that add/remove records from the list that you want to display.

              • 4. Re: Auto-Scrolling Databases
                JordanSherrard

                     Yes there is a need for changes to this list.  This list will just formulate the current ongoing, upcomming, and incomplete jobs.  Once a job is complete I would like for it to be deleted off this list.  That is why I can't share the form data from my client list onto this list and have made the post for Auto-Fill.

                      

                     This ties in with the questions I have posted on the auto-fill that we have been discussing.

                     Once a new client is added into the system it will auto generate into the scheduling system.  Then when I do my updates on the scheduling system I will give the needed values to this customer.

                     I am planning to have a script that will remove a customer once the job reaches 100% complete or status is changed to paid in full.

                     Which that then changes the number of customers on the schedule.

                      

                • 5. Re: Auto-Scrolling Databases
                  philmodjunk

                       I don't see any need for auto fill here, just a need to effectively manage your found set of records. The same script that periodically scrolls the window to the next set of records can also update the found set to refelect the changes in status. The key detail that can complicate this a bit is whether or not there is a specific order to the displayed records and whether including a new record in the found set will result in inserting that record between existing ones and whether that creates any possible issues for the users.

                       Example: a record changes status and the script then includes the record, resorts them and this puts it between records 2 and 3 of the previous found set of records. But the view has been scrolled several pages down so one record from the last "page" is no shown again as the first record of the new page and the newly added record won't be visible until the page scrolling resets to home to show the first group of records that include this new record.

                       

                            This ties in with the questions I have posted on the auto-fill that we have been discussing.

                       Yes, but given the very large number of threads where I post comments, I don't recall which of those threads are yours. wink

                  • 6. Re: Auto-Scrolling Databases
                    JordanSherrard

                         The control option for customers on this list of scheduled jobs I am wanting to auto scroll would be by date.  SO if i just put a calculation in for the date system if I find a new customer with an older date should it not reorder depending on those dates?  or would it be better to use a sort script at that point.

                          

                         Other thread we are discussing is at the link below: (these tie into each other)

                         http://forums.filemaker.com/posts/39787f113e?commentId=250218#250218

                    • 7. Re: Auto-Scrolling Databases
                      philmodjunk

                           And now that I have  link, I will repeat that I don't think that you need auto-fill for this purpose.

                           The fact that it will re-order is exactly the possible issue that I am attempting to illustrate. For your users it may or may not be a problem.

                           Here's a modified script (which also corrects a +10 error in the original) that would update and re-sort the found set each time the Timer set with Install OnTImerScript performs it:

                           Freeze Window
                           Perform FInd [Restore]
                           Sort Records[Restore; no dialog]
                           If [$$PageCount < Ceiling ( Get ( FoundCount ) / 10 ]
                              Go to record/Request/Page [ ( $$PageCount * 10 ) - 9 ] ---> use by calculation option, parenthesis may be omitted if you want
                              Set Variable [$$PageCount ; Value: $$PageCount + 1 ]
                           Else
                              Set Variable [$$PageCount ; Value: 1 ]
                           End If