9 Replies Latest reply on Sep 4, 2016 9:36 AM by bobmillermagic

    Kiosk mode: Export files?

    tays01s

      A script in FM that finds the desktop filepath, makes an Export folder, then exports specified records doesn't work in Kiosk mode. Is that because the script goes 'outside' the kiosk or simply the way I've written the script? Are there any specific points I should look for that while they work under FM, won't under Kiosk?

        • 1. Re: Kiosk mode: Export files?
          mikebeargie

          What do you mean by "makes an export folder" ? Are you using a plugin to do that?

           

          There are differences in runtime solutions that are indeed incompatible when compared to their operation in filemaker pro.

           

          Without seeing your script, it's difficult to speculate what the issue is, but surely it's most likely linked to runtime incompatibility.

          • 2. Re: Kiosk mode: Export files?
            tays01s

            Yes, it may be Base Elements plugin that's the problem. It was quite a hassle finding something that worked to get a filepath to create desktop folder in which to put the exported files. Basic script below:

             

             

            Set Error Capture [ On ]

            Go to Layout [ “Home_Ex_U” (Home) ]
            Freeze Window
            #Set device-specific desktop paths
            Set Variable [ $Device; Value:Get ( Device ) ]
            #Trim DesktopPath for Mac because BE_ function doesn't use it. Can't use same path for Export files. If [ $Device = 1 ]

            Set Variable [ $path; Value:Substitute(Get(DesktopPath); "/Macintosh HD"; "") ] Else If [ $Device = 2 ]

            Set Variable [ $path; Value:Get(DesktopPath) ] End If

            #Set generic folder paths and create folders with BE

            Set Variable [ $Create_export; Value:BE_CreateFolder ($path&"FC_Export files") ]

            Set Variable [ $Create_import; Value:BE_CreateFolder ($path&"FC_Import files") ] #Export/import files: The export doesn't work and I've not yet thought through import If [ IsEmpty (Patient_exports::__uuID) ]

            Show Custom Dialog [ Title: "No records for export"; Message: "[X] checkbox those records you wish to export."; Default Button: “OK”, Commit: “Yes”; Button 2: “Cancel”, Commit: “No” ]

            Else
            If
            [ $Device = 1 ]

            Set Variable [ $Filepath; Value:Get (DesktopPath)&"FC_export files/" ] Else If [ $Device = 2 ]

            #Check below DT path works. NB: FM syntax means have to use \\ for \ if there is " or \ or ¶ is following

            Set Variable [ $Filepath; Value:Get ( DesktopPath )&"FC_export files\\"&

            Case(
            Sum ( Patient::Export_record )<1; Patient::Lastname& "_" & Patient::Firstname& "_" &
            Substitute (Patient::BirthDate ; "/" ; "_" ); "Record_batch_" )

            & ".fmp12" ]

            End If
            Set Variable
            [ $ex_patient; Value:$filepath&"Export_patient.fmp12" ]

            If [ Patient::Export_record = 1 ]

            Export Records [ File Name: “$ex_patient”; Character Set: “Unicode (UTF-16)”; Field Order: Patient::__uuID

            Patient::Date_modified

            Patient::Lastname

            Patient::Firstname

             

            End If
            // Show Custom Dialog
            [ Title: "Exported files"; Message: "Find on: Desktop > FC export_files"; Default Button: “OK”, Commit: “Yes” ]

            End If
            Go to Object
            [ Object Name: "Export Records" ]

            • 3. Re: Kiosk mode: Export files?
              mikebeargie

              Obvious things to check:

               

              1) Is the plugin bundled properly with the runtime?

              2) Does the folder get created?

              3) What are the VALUES of $Create_export and $Create_import after the set var steps are run? (Most functions return 1 with success, 0 or other text message with error).

              4) Scan this list, anything stick out? Differences between the runtime application and FileMaker Pro (FileMaker Pro Advanced)

               

              You might want to turn error capture OFF at the beginning of your script to see if any obvious errors pop up that point to a specific failure point.

              • 4. Re: Kiosk mode: Export files?
                tays01s

                Thanks, I will work through the list.

                1. Properly bundled? What do I do/ check?

                2. No, no folders created, so it is possible that it's in the first steps ± the Base Elements plugin that the problem lies.

                • 5. Re: Kiosk mode: Export files?
                  tays01s

                  1. Plug-ins: In Preferences I've allowed them to install, so I'm assuming they should work.

                  • 6. Re: Kiosk mode: Export files?
                    mikebeargie

                    Try:

                    http://www.filemaker.com/help/12/fmp/html/func_ref2.32.41.html#1060792

                     

                    With that you can get a list of installed plugins to check and see if BaseElements is installed.

                     

                    If I recall, you do need to include a copy of the plugin files in a folder with your runtime.

                    • 7. Re: Kiosk mode: Export files?
                      user19752

                      The setting is used by script step

                      Install Plug-In File

                      Do you use script (and container field) to install plug-in?

                       

                      Otherwise, you need to copy plug-in file manually into runtime, as Mike mentioned.

                       

                      I would use Case() function to set device dependent values, instead of IF[] steps.

                      • 8. Re: Kiosk mode: Export files?
                        Stephen Huston

                        Keep in mind that kiosk mode is set by the Developer Tool but doesn't require a runtime bundle, works with Pro just fine. However kiosk is invoked in less-than-FULL privilege sets which can be set with or without Export permissions, so check the permissions settings as well.

                        • 9. Re: Kiosk mode: Export files?
                          bobmillermagic

                          BaseElements plugins return "0" for success.