July 27, 20178 yr Hi there! I have installed ScriptMaster to Filemaker Server 16 under Windows Server 2012 R2 If I use getContainerStream in a server script I get an exception: Quote try{ container = fmpro.getContainerStream(<containerFieldName>); } catch(e) { return e; } Returns com.prosc.fmkit.FmCalculationException: 106 The containerField is defined as external / open. Exporting the content using Export Field Contents works fine. This worked fine before updating from Filemaker 14. Am I missing something? Regards, Thorsten P.S.: Same error occurs on fmpro.getContainerFileName Edited July 27, 20178 yr by Thorsten Kaltenborn
July 27, 20178 yr error code 106 106 Table is missing what are you passing to the script as a parameter???
July 27, 20178 yr Since this is a server side script, you also need to make sure you are providing context in your script so that when you pass in the container to your function you are on a layout where that field exists or at least on a layout of a related table. If you are calling this from an unrelated table I could see this error occurring.
July 28, 20178 yr Author This a Filemaker error number? Have not thought of that. Unfortunately I am using a layout of exactly that needed table. The server script switches to the layout and searches for the record which is passed a script parameter. If found it passes the name of the container field to the groovy script. The container field itself is part of the table, not a referenced one. As I mentioned before, the script worked fine before switching from Filemaker Server 14 to 16 (I had to change the server, too). I will try to make a new (and smaller) database in which I can show you the behavior.
July 31, 20178 yr Author OK, I made a simple test file which only contains the faulty functions. I also enclosed the 360Plugins_Server.log Maybe you can see, what goes wrong. I work on Windows Server 2012 R2. The password for admin is admin SM-Test.zip BTW: I realized, that the last command in the groovy script is wrong, but this is not the real fault Edited July 31, 20178 yr by Thorsten Kaltenborn
July 31, 20178 yr Doesn't work because of this: Get ( DocumentsPath ) the path you pass to any SM function needs to be a correct O/S path not the FileMaker version of that... The raw path I get back from my Server 16 is: /C:/Program Files/FileMaker/FileMaker Server/Data/Documents/ setVariable $thePath = Substitute ( Middle ( Get ( DocumentsPath ) ; 2; 999 ) ; "/" ; "\\" ) will work, then use it in the function call and you are appending the FILENAME to a new file not it's contents with this - f.append ( container ) try this? // SaveContainerAsFile ( fm_field ; fm_fileOut ) // v1.0 // J Renfrew // fm_field = FQFN of container field // fm_path = fullOS path and filename f = new File( fm_fileOut ) if (f.exists()) { if (!f.delete()) { //throw new IOException('Could not delete ' + f.getAbsolutePath()) return 'Could not delete ' + f.getAbsolutePath() } } try { f.append( fmpro.getContainerStream ( fm_field ) ) } catch (e) { return e.getMessage() } return true Edited July 31, 20178 yr by john renfrew
August 2, 20178 yr Author Dear John, thank you for your help. You are right, new File would not work with this path. Unfortunately this isn't my real problem because I still get error 106 even if I comment out the whole export part of the function leaving only // SaveContainerAsFile( fm_field )" ; try { inData = fmpro.getContainerStream ( fm_field ) } catch (e) { return e } return true So the error is somewhere else. Edited August 2, 20178 yr by Thorsten Kaltenborn quoting / coding
August 3, 20178 yr Author Today I read, that FM 16 has new security options. Maybe I can find the answer there? @John: Did you test my file on your server? Did it work for you? Edited August 3, 20178 yr by Thorsten Kaltenborn
August 14, 20178 yr I have the same problem. Also fmpro.evaluate ( "Get ( TemporaryPath )" ) does no longer work server side.
August 30, 20178 yr Author On 14. August 2017 at 0:23 PM, andries said: I have the same problem. Also fmpro.evaluate ( "Get ( TemporaryPath )" ) does no longer work server side. Hi Andries, did you find a solution? Was on vacation so I didn't had time to investigate any further.
September 27, 20187 yr Just a me too on this - exact same server config (win 2012R2, FMS 16, Master 5.09). In case anyone is still looking in and has made progress. I can't upgrade to server 17 - just yet - and wondered if anyone else had figured out what was up with fmpro.getContainerStream and other fmpro methods
September 27, 20187 yr I've noticed that a client running a v4 SCriptMaster plugin works OK, so going to try that on a test server later
September 27, 20187 yr Author Hi Alan, 7 minutes ago, AlanTrewartha said: I've noticed that a client running a v4 SCriptMaster plugin works OK, so going to try that on a test server later in my case client version 5.x works fine, too. Only the server version can't access the container. Regards, Thorsten
October 4, 20187 yr Yes, I've managed to check it works on my client with v4 and v5, but NOT v5 on the server, and I know it DID work with v4 on an older (FMP11) server
October 4, 20187 yr It is an issue that 360works are aware of, and as I far as I know working on... It affects my work quite significantly, especially now that the older versions do not install on FMS!7
May 23, 20196 yr Author Hello all, just wanted to let you know, that I could solved the issue by updating to ScriptMaster 5.2 BR, Thorsten
Create an account or sign in to comment