Jump to content
Sign in to follow this  
gczychi

Script Running on Server doesn’t see Records of External FM Data Source

Recommended Posts

FMS17: In my Import.fmp12 database, I have specified an external FileMaker database file:Main.fmp12 and added a couple of table occurrences to this file (with the same names as in Main.fmp12) and added the corresponding layouts.

When I open Import.fmp12 from a client, I can see and work with all records of the Main.fmp12 file, just fine. From the client, I can also run any script just fine.

However, when I run the same script as a scheduled script from the server (only with server compatible script steps, of course) the script runs, but I can’t see any record !

Here are some script steps that I use:

     Go to Layout [ “Kontakt” (Kontakt) ]

     Show All Records

     Set Variable [ $id_Käuferbetrieb ; Value:  Let ( [ ~fmsql_execute = True ; ~query = "  SELECT id FROM Kontakt WHERE Betriebsnummer = ?  " ; ~columnSeparator = Tab ; ~rowSeparator = ¶ ; ~result = … ]

And this is what I get:

(Import is a local table and a local layout)

LayoutName: Import

RecordCount/FoundCount: 1324/30

LastError: 0

(Kontakt is a local layout with data from a remote table of an external data source from Main.fmp12, with TO «Kontakt»)

LayoutName: Kontakt

RecordCount/FoundCount: 0/0

fmsqlresult: ?

LastError: 0

I’m puzzled — Any idea what’s wrong?

Thanks a lot for any help!

Gary

Share this post


Link to post
Share on other sites

OK, I have found the problem:

The account that I use in FMS to execute the script was not defined in both files, but only in one. Makes sense.

So, in order to be able to access data in an external data source, the same account which FMS uses to execute the script needs to be present in both files.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Content

    • By Koonce
      I have an export script and it tries to save to server i need it to save to the local desktop cannot get scrip to work... I know Im doing wrong... need help thanks in advance.
       
    • By carlsson
      Today I updated FM Server from 17.02 to 17.05. After this update WebDirect refuses to start. 
      When I click on the slider, it says "Enabled",  but when I go back again it's Disabled.
      I have looked for Java updates, but I already have the latest update applied. 
       
      I'm on macOS 10.13.6 with all security patches applied.
      I haven't installed SSL yet, but it worked before this update so....
      Where should I look more?
       
      Please help! 😩


    • By Nuos
      Hey Folks
      Im running Server 17 and have a number of scripts configured to run. Recently, some have stopped executing.  What I mean is I select it to run (or the server runs it as scheduled) and then when I run it manually, there are records that have not been processed. So I checked logs  log. "Last Scripting Error (802)"
      Any recommendations how to resolve this?
       

    • By fmworm
      Hello Everyone,
      We are planning to use FileMaker server 17 on AWS. And for client, thinking of using AppStream 2.0.
      I would like to know if there is any sort of issues using Appstream 2.0, means, performance issue or any limited functionality.
      Also would like to take your suggestions, instead of using Appstream 2.0, is there any other solution or way to connect filemaker apps hosted on AWS.. without installing filemaker client on user. machine.
      Thanks in advance.
       
    • By Spidey
      Hi,
      I am totally new in xslt.  I have the following xslt and I tried to export as xml.   I got an error.    "SAXParseException: invalid document structure".  Is there a problem in my structure?  What's the proper structure?
       
      <?xml version='1.0' encoding='UTF-8' ?>
      <xsl:stylesheet version='1.0'
        xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
        xmlns:fm="http://www.filemaker.com/fmpdsoresult"
        exclude-result-prefixes="fm">
            <xsl:output version='1.0' encoding='UTF-8' indent='yes'
              method='xml' />
            <xsl:template match="/">
            <cityforcast>
                  <xsl:for-each select="fm:FMPDSORESULT/fm:ROW">
                        <forcast>
                              <id><xsl:value-of select="./fm:ID” /></id>                       
                              <city><xsl:value-of select="./fm:City” /></city>
                              <temperature><xsl:value-of select="./fm:Temperature” /></temperature>
                              <humidity><xsl:value-of select="./fm:Humidity” /></humidity>
      <windspeed><xsl:value-of select="./fm:Wind Speed” /></windspeed>
                              <winddirection><xsl:value-of select="./fm:Wind Direction” /></winddirection>
                              <clouds><xsl:value-of select="./fm:Clouds” /></clouds>
                        </forcast>
                  </xsl:for-each>
            </cityforcast>
            </xsl:template>
      </xsl:stylesheet>
      Weather.fmp12
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.