1 2 Previous Next 15 Replies Latest reply on May 6, 2013 6:19 PM by Malcolm

    Run Script on Timed Logout

    stwinton

      Is there a script trigger to run a script when a user is automatically logged out after the inactivity period has elapsed?

       

      Furthermore, can this script log on a "Guest" user and then cycle through layouts as a "Slidehow" of data on an iPad using Go?

       

      Any user touching the screen would stop the script and the "Home" layout would be active.

       

      Is a Guest account a "User" as far as FMPAS is concerned?

       

      Thanks!

        • 1. Re: Run Script on Timed Logout
          Mike_Mitchell

          Starting with the easy one: Any user logging into a hosted database registers as a "user", including automated processes. It doesn't matter what account is used.

           

          On the Script Trigger question: Yes, the OnLastWindowClose trigger will run when a user is logged out. However, it sounds like what you're trying to do is log back into the same database in a sort of kiosk. Is that right?

           

          If it is, I suggest you use a slightly different method. Create a second database that runs an OnTimer script. Have that script check to see if the primary database is open however often you want. If not, have it open the primary database and run your slideshow script.

           

          HTH

           

          Mike

          • 2. Re: Run Script on Timed Logout
            stwinton

            Yes, I am developing a kiosk app...I should have said that in the first place! To summarise:

            Up to 20 users on site, access via Go on iPad in locked down, controlled access mode.

            App runs in Kiosk mode (full screen)

            When idle, users logged off automatically

            In idle mode, screen rotates through layouts as a form of marketing and education

            Users may touch screen to "Wake" iPad ( no user name or password required)

            Users may then navigate between layouts to read at their own pace, or enter simple data (answer questions via check boxes, for example)

             

            I was looking at the OnTimer Script function, but couldn't see how that might apply. Your suggestion of two databases is interesting, but I am afraid you are dealing with someone who can be described as a Beginner...

             

            Questions:

            Can both primary and secondary databases have exactly the same information? (There will be multiple users, some of whom may be entering data and others who will be passive)

            Can both databases reside in the same FMP file?

             

             

            As an alternative in the above is not possible:

            Is it possible to automate the transfer of databases to remote iPads and then have the script run the local version in Go rather than be connected to the FMP12 server?

             

            Thanks

             

            Stuart

            • 3. Re: Run Script on Timed Logout
              Mike_Mitchell

              Okay. Here's what I would suggest:

               

              Run your slideshow in a local FileMaker database (running on the iPad, no connection to Server). When a user taps in, have that slideshow database open the hosted file. Whenever the person logs out, or when the server logs him out, your local database takes back over via the OnTimer script. They would therefore be two databases.

               

              Mike

              • 4. Re: Run Script on Timed Logout
                stwinton

                Thanks for the broad directional suggestion on two databases. That just leaves me the problem of remote iPad management...

                Also, I would like to update the slideshow DB with data collected by the interactive DB...automatically. Is there a sneaky way I can have the server detect changes, copy the file and then send to a defined set of devices? This is getting complex...

                • 5. Re: Run Script on Timed Logout
                  Mike_Mitchell

                  No. The only way to do that is to have the slideshow database download from a container field on the server-hosted database on some periodic basis. But you can't have the server go out and "grab" the database off the iPad. Besides, would you really want to? How do you know which copy to grab? What if two different copies both update data - which one "wins"?

                   

                  Maybe we need to back up here. What exactly are you trying to accomplish? You say you don't want the iPads to be connected to the server, yet you want the server to manage the iPads. Those are largely mutually exclusive goals. It sounds like what you really want is more like a web-based application, running something like a JavaScript slideshow and then connecting to the server when a user "pokes" it. A stateless situation where user actions are uploaded to the server. Is that more closely what you're looking for?

                  • 6. Re: Run Script on Timed Logout
                    stwinton

                    Ah sorry, I think I have confused the issue!

                    I don't want the server to " grab" the local slideshow database.

                     

                    When there is no local user, Go runs a local "Slideshow" database (as per your suggestion).

                     

                    When the user taps on, the Go app selects the server database. The users views and updates the server database. When he is finished (indicated by timed auto log off), the server makes a copy and SENDS it to the nominated iPad(s) to replace the local slide show database. That way, any changes made by the user are (almost) immediately locally available.

                     

                    Or, I give up the complex two database idea and simply have a default page displayed all the time and get the user to tap to see the rest of the data (I really like the idea of changing layouts though). FMP Go would use a common remote database which could contain multi media resources that could be used in a container in the default page, providing colour and movement to attract the user.

                     

                    This way, there will be a user for very iPad client (quickly exhausting my server license!) but I remove the DB swapping issue. However, the slideshow problem remains...

                     

                    Can a script be written so that a layout is displayed after a period of inactivity?

                     

                    And then, when the screen is tapped, could the user be automatically redirected to a different layout ( thus stopping any MM activities)?

                     

                    Thanks again!

                    • 7. Re: Run Script on Timed Logout
                      Mike_Mitchell

                      Exactly what are you wanting the server to make a "copy" of?

                       

                      And I'm not sure what you mean about "exhausting server license"? How many users are you expecting on this application?

                      • 8. Re: Run Script on Timed Logout
                        stwinton

                        The maxium number of users with a FMP 12 Server license is 250 (I think).

                         

                        My application will involve a number of sites, each site will have from 5 to 25 users (each user will have an iPad, bolted to the wall in a protective case, auto boot, permamnantly powered, running 24/7, kiosk mode, guided access mode, auto log on of "Standard" user)

                         

                        This means that I will need to purchase a new server license after 10 to 50 sites

                         

                        My reason for copying databases back and forth was to try and create a situation whereby only logged in users access the online database, thereby counting as one user, but when the user is logged off, the iPad displays a simple "Slideshow" that acts as a marketing and awareness tool for viewers (i.e. users that have not logged in by tapping the screen). However, as a refinement, I wanted any data that users enter to be reflected in the slideshow...for example, how many people have logged in today...how many people agree with a certain proposition...how much energy has been used today...news from RSS feeds...data from other applications in the "Suite" we are developing.

                         

                        The other reason for having a local database available, was to ensure that SOMETHING was diaplayed if communications to the server was lost.

                         

                        However, upon reflection, perhaps I should just accept the limitations of the server license. Its not that big a deal.

                         

                        So, as I said before...the issue now is how to automatically display a named layout after a time delay whilst maintaining a connection to the server (i.e. when the user is finished and walks away, the application will default to "Slideshow" mode to maintain its visual marketing role)

                         

                        Therefore, most of the time the application will have a standard, low level user permanantly signed in when the iPad boots.

                         

                        However, administrators should have a "Backdoor" way of signing in locally to make any necessary changes and to exit out of kiosk mode and to get full access to the iPad IOS.

                         

                        (Ideally I would like to be able to remotely manage the iPads, but I have yet to find a way of doing this...still waiting for Apple Australia to explain how this might be done)

                        • 9. Re: Run Script on Timed Logout
                          Mike_Mitchell

                          Okay, first off, if you use Server Advanced, there's no imposed user limit (see http://www.filemaker.com/products/compare/). Of course, that's more expensive, but vastly more scaleable.

                           

                          That said, I suggest that, should you want to have the local version updated via the server version, you do that from the local version, probably through an intermediary file. The reason is, the hosted database has no good way to make a file reference (now known as an External Data Source) to dozens of local files. However, all those local files CAN refer back to the hosted database. Further, they can update their own information from the server whenever they log in.

                           

                          You'd likely want to do that through a "helper" file, though, since that way, you can avoid putting any table occurrences to the hosted file in your kiosk file. That way, it won't be inclined to throw up that "I can't find it!" dialog when the hosted file is unavailable. Instead, it can open the helper file, which can then go check for the hosted file. It's much like the strategy used for syncing mobile databases recommended in the Syncing Guide (attached).

                           

                          Your "helper" file can also fire off a script to your kiosk file, telling it, "Hey! No can talk to server!" This can, in turn, tell the kiosk file that it's time to "go local".

                           

                          HTH

                           

                          Mike

                           

                          P.S. On the other matter - how to manage the iPads remotely - there was a presentation at last year's DevCon on doing exactly that. There are some products out there that allow enterprise management of mobile devices. One such product is XenMobile. Another is iPad Configurator. Unfortunately, I don't have my notes handy, so I can't give you specifics on what is what, but you can probably research them out for yourself.

                          • 10. Re: Run Script on Timed Logout
                            stwinton

                            Thanks (again) Mike...I think the final program will be simple in the extreme but I just need to know what is possible...I dont mind paying the extra for Server Advanced. I just didnt realise it was "Unlimited".

                             

                            Now that I have eliminated the users problem, I now simply need to know how to detect when someone has tapped the iPad screen...any ideas?

                             

                            Thanks for the Sync Guide too...I should have been at DevCon 12! (I will be at DevCon 13 however!).

                             

                            Also, the enterprise management of IOS devices is something I had heard of, and can see how useful that woudl be. But remote "Desktop" management seems to be something that isnt yet supported by Apple.

                             

                            Stuart

                            • 11. Re: Run Script on Timed Logout
                              Mike_Mitchell

                              If your slide show is running and someone taps the screen, why isn't that just a button on the container field (or the container field as a button)? I'm confused.

                              • 12. Re: Run Script on Timed Logout
                                stwinton

                                Yes, could be. But I would like my slideshow to show more than just stuff in a container (as useful as that is). Charts mainly.

                                 

                                I guess I coudl provide a TAP HERE button on every layout and users can be guided to click that.

                                 

                                I am getting there...displaying my ignorance of anything but the simplest applications for FMP!!

                                 

                                I just need to find a few examples of the INSTALL ON TIMER script, and I'll be OK I think.

                                • 13. Re: Run Script on Timed Logout
                                  Mike_Mitchell

                                  You can make the chart object a button as well. Any object on a FileMaker layout can be defined as a button.

                                   

                                  Alternatively, you can go "old school" and place a large, transparent rectangle over the entire layout. Make that a button.

                                  • 14. Re: Run Script on Timed Logout
                                    stwinton

                                    Hey Mike, I finally got everything sorted out and working exactly as I want it to operate....except:

                                     

                                    When running kiosk mode on the iPad (iOS 6.1.3 and FMG 12.0.7) a black bar appears at the top of the screen. Searching through the forums I notice this is listed as a bug...any idea if there is a work-around?

                                     

                                    If I put a movie file into a container field, it will play automatically in OSX but not in iOS...any work-around for this?

                                     

                                    Other than those two issues, I am fine for now. Thanks again for all your help. Now i just need to work out the synchro bit to make sure my remote iPads function even when disconnected from the server.

                                     

                                    Stuart

                                    1 2 Previous Next