8 Replies Latest reply on Feb 23, 2017 7:27 AM by JeffHenry

    FM Cloud - PSOS Compatibile Script Steps and Functions

    JeffHenry

      Hi Community,

       

      Does anyone know if these functions are functional when doing PSOS on FileMaker Cloud?

      - Export Field Contents

      - Import Records

       

      Edit: I've verified that Get(TemporaryPath), Get(DesktopPath), and Get(DocumentsPath) all return valid paths, but I am getting an error code of 3 when trying to export a container field to the temporary path.

       

      Can't find any documentation on compatibility with FM Cloud.

       

      I'm looking to do a PSOS export/import process on a FM Cloud Instance. Client needs to frequently import .csv files into their hosted solution on FM Cloud. This consists of about 2500 records with 20 fields per record. Across the network, this takes about 15-20 minutes. I believe with a traditional FileMaker Server setup you are able to use PSOS to export the file locally to the server from a container and have the PSOS import the file into the table. I am trying to replicate this on FileMaker Cloud.

       

      Thanks,

      Jeff

       

      Message was edited 1:41 PM

        • 1. Re: FM Cloud - Get(TemporaryPath), Get(DocumentsPath)
          philmodjunk

          A simple way to test:

           

          A single line script performed via PSOS:

           

          Exit Script [ Get ( TemporaryPath ) ]

           

          The script that does the PSOS call can then use Get ( ScriptResult ) to get that result and put in in a dialog, text field or whatever so that you can see what data is returned.

          1 of 1 people found this helpful
          • 2. Re: FM Cloud - Get(TemporaryPath), Get(DocumentsPath)
            JeffHenry

            Hi philmodjunk,

             

            Great, simple suggestion.

             

            I just tested this and got valid results back for Get(TemporaryPath), Get(DocumentsPath), and Get(DesktopPath). So all 3 of those functions work with the linux environment.

             

            Now I'm debugging the Export Field Contents [ Test::Field ; $Path ] which is returning an error code of 3. Can't see anything wrong with my export path and I know I'm on a valid record. Leading me to believe that the script step is not supported. Can't find any documentation for FM Cloud though. I do notice that the Export Field Contents is marked as unsupported for Server Scheduled scripts according to this page: Export Field Contents

             

            Is PSOS grouped with that?

            • 3. Re: FM Cloud - PSOS Compatibile Script Steps and Functions
              philmodjunk

              yes, PSOS scripts have the same limitations and compatibility as server scheduled scripts so far as I know.

               

              Plus they have a few new onces unique to PSOS--namely, PSOS can't open a FileMaker file, the client has to open it first before performing the PSOS call.

              • 4. Re: FM Cloud - PSOS Compatibile Script Steps and Functions
                JeffHenry

                Hmm, alright. I figured it fell under the same category. Appreciate the help!

                • 5. Re: FM Cloud - PSOS Compatibile Script Steps and Functions
                  ch0c0halic

                  A PSOS is limited in the same way a scheduled script is limited. It cannot access any file not being served on the same FMS where it resides.

                   

                  The PSOS is not an extension of the client running the script.

                   

                  The PSOS is launched as a virtual client in a virtual window on the FMS. When it is launched the file the script runs in is "opened" from a new client. If it has an on first window open script trigger the designated script will run before the PSOS script.

                   

                  There is no environmental information from the invoking client, for example: global/regular variables, what files are open or any window's found set.

                  1 of 1 people found this helpful
                  • 6. Re: FM Cloud - PSOS Compatibile Script Steps and Functions
                    JeffHenry

                    Hi ch0c0halic,

                     

                    I'm familiar with the fact that PSOS is a virtual client and some of the rules that come along with it. It's just odd to me that it can successfully locate file paths, but can't export field contents to the same path it provides back. I'm trying to export the contents of a container onto the temporary drive where the FM Cloud instance is running. The PSOS would go through the entire process of getting the file path, exporting the field contents (a .csv file provided locally by the client), and importing the .csv file into a table.

                     

                    Hopefully FileMaker will provide more documentation for FM Cloud in the future.

                    • 7. Re: FM Cloud - PSOS Compatibile Script Steps and Functions
                      philmodjunk

                      Yes, I am quite aware of this. But PSOS also cannot access a file that the client which initiated the PSOS call has not already opened. Data references that automatically use the current file's credentials to open (in the client session) other files hosted on the same server do not open such file from the PSOS session.

                       

                      I have previously reported this as a bug and was told that it was expected behavior for PSOS.

                      • 8. Re: FM Cloud - PSOS Compatibile Script Steps and Functions
                        JeffHenry

                        Thanks, makes sense. I went with a work around of using an import table in combination with the export records script step which is supported by PSOS. Not as efficient as hoped, but it does the job.