8 Replies Latest reply on Oct 22, 2014 12:59 PM by DickHoning

    PSoS Import Records and Get ( FoundCount )

    DickHoning

      Hi there,

       

      after an Import (update matching & add remaining) via Perform Script on Server Get ( FoundCount ) returns the total number off records in the table instead of the number of imported records.

       

      Doe anybody know what I might be doing wrong ? Is this a bug ?

       

      Thanks in advance and best regards - Dick Honing

       

      http://www.ecorganizer.nl - ecOrganizer CRM & ERP software

      http://www.ecxs.nl - FileMaker Go custom built solutions

        • 1. Re: PSoS Import Records and Get ( FoundCount )
          bigtom

          What found count are you looking for? If you do not have the records you want to find flagged in some way or specified in the find. I am assuming you want to find how many were imported, updated, or new. But there is no way to tell from the info you have.

          • 2. Re: PSoS Import Records and Get ( FoundCount )
            DickHoning

            I'm looking for the number off records that have been imported. This works fine when I run the script locally but when I run the same script via Perform Script on Server the Get ( FountCount) function returns the total number of records in that table.

            • 3. Re: PSoS Import Records and Get ( FoundCount )
              wimdecorte

              If you do a Get(FoundCount) *AFTER* running the PSoS script then no, it is not a bug.  the PSoS spawned and closed its own session on the server, the Get(FoundCount) that runs after works in the original client session.

               

              You should do the Get(FoundCount) inside the PSoS script and use the "Exit Script" to pass that number along to the calling script in the client's session.

              • 4. Re: PSoS Import Records and Get ( FoundCount )
                DickHoning

                Hi Wim,

                 

                the Get ( FoundCount ) is set in the script that is running on the server. It looks like all records are shown after an import when the script is ran on the server.

                • 5. Re: PSoS Import Records and Get ( FoundCount )
                  DavidJondreau

                  Do all of the records in the target table have a match in the source table?

                  • 6. Re: PSoS Import Records and Get ( FoundCount )
                    DickHoning

                    Not all of them. Records that have been imported in the target table before do have a match and new records in the source table not yet. So that's why I do an import with update matching & add remaining.

                     

                    I just double checked whether I'm doing something wrong.

                     

                    These are the results from my log file:

                     

                    Script performed in FileMaker

                     

                    Sync Started. 10.9.4 ProAdvanced13.0v3

                    0 klanten geëxporteerd

                    0 installaties geëxporteerd

                    1 bonnen gevonden

                    1 bonnen geimporteerd

                    Sync Finished.

                     

                    Same script performed on Server

                     

                    Sync Started. 10.9.2 Server13.0v1

                    0 klanten geëxporteerd

                    0 installaties geëxporteerd

                    1 bonnen gevonden

                    21561 bonnen geimporteerd

                    Sync Finished.

                     

                    So I'm doing a find in the source table which results in 1 record found which I then import in the target table. After the import I'm checking the number of records via Get ( FoundCount) which is correct when the script is ran in FileMaker but returns all records when the script is performed on the server.

                     

                    My conclusion is that when the Import is performed on the server all records are found after the import instead off just the records that where imported.

                    • 7. Re: PSoS Import Records and Get ( FoundCount )
                      DavidJondreau

                      It seems like you have a different issue.

                       

                      My Dutch is non-existant, but it looks like you had 1 record imported on the Pro and 21,561 imported on the Server. The found set after the import reflects *that*. The question is why is Server importing all your records? not, why is the found set after the server import showing all?

                       

                      Also, Filemaker Server doesn't import Filemaker to Filemaker on the Server, so I'm not sure how you're restricting the found set on the source table.

                       

                      I'd be interested to see the whole script.

                      • 8. Re: PSoS Import Records and Get ( FoundCount )
                        DickHoning

                        Hi David,

                         

                        the Import scriptstep not working when Performing the Script on Server would explain what I'm experiencing.

                         

                        I'm new to PSoS and didn't know that the Import scriptstep doesn't work. It's not greyed out when you select 'Server' at 'Show Compatibility'.

                         

                        Thanks for your help.

                         

                        best regards - Dick

                         

                        P.s.: this is wat I didn't know ... upto now ;-) ... 'Importing/exporting directly to and from another FileMaker Pro file is not supported via a FileMaker Server scheduled script.'

                         

                        the article: http://help.filemaker.com/app/answers/detail/a_id/7035