FileMaker version 12 or higher.
When 360Plugins are intialized for the first time, they will automatically download all required support files
Drag the plugin from the MAC or WIN folder into your FileMaker extensions, and restart FileMaker.
If the plugin does not load correctly, please send an email to support@360works.com
Install plug-ins for use with WebDirect by dragging the appropriate plugin to FileMaker Server/Web Publishing/publishing-engine/cwpc/Plugins
You do not need to do this step unless you plan on using the plugin with Instant Web Publishing with FileMaker Server Advanced. You will need an Enterprise license to use this feature.
For installing into the Web Publishing Engine with FileMaker Server or FileMaker Server Advanced, drag the plugin from the MAC or WIN(.fmx) folder into the FileMaker Server/Web Publishing/publishing-engine/wpc/Plugins folder. If there is no Plugins folder inside the wpc folder, then create it manually. Restart FileMaker Web Publishing, and now the plugins should be ready to go.
The easiest way to test whether the plugin is working is to call the version function of the plugin, and display that on an IWP layout. If it shows "?", then the plugin is not working. If it shows a number, then the plugin has been installed successfully.
If you are using FileMaker Server 12.0v1, you can follow the same procedure as detailed above for custom web publishing. However, in FileMaker Server 12.0v2 and later, custom web publishing now runs as a 64-bit application and requires the 64-bit version of the plugin You will need an Enterprise license to use this feature.
For Mac, the single plug-in file in the MAC directory contains both 32-bit and 64-bit versions. For Windows, look for the plug-in that has the extension .fmx64 and use it in exclusively in custom web publishing.
To install 64-bit plug-ins, install either the .fmx64 or the .fmplugin to the following directory:
FileMaker Server / Web Publishing / publishing-engine / cwpc / Plugins
If it does not exist, create the Plugin folder manually. Restart FileMaker Web Publishing, and then you can then test a script that contains a plug-in and see if it returns the correct values.
You do not need to do this step unless you plan on using the plugin with scheduled script triggering. You will need an Enterprise license to use this feature.
360Works has created an AutoUpdate helper database which makes setting up AutoUpdate much easier. This file includes pre-configured plugin files which you can place on your server, and an AutoUpdate script for each of our plugins which you can paste into your own solution.
You can get the AutoUpdate360Works file here Follow the instructions included in the file to either host your own Auto Update server or pull the files from ours.
Plugins will run in demo mode until they are registered. While running in Demo mode, the product will run for 2 hours every time you launch FileMaker / FileMaker Server / FileMaker Web Publishing Engine. The 2 hour time limit will reset every time you relaunch FileMaker. There is no expiration date when Demo mode stops working. There are no feature differences between the Demo version and the licensed version.
Once you have purchased the plugin, you can register it with the license key. Once a valid license key is entered, the product will run for as long as FileMaker is running. After FileMaker starts up with the plugin installed, open FileMaker preferences, click on the Plug-ins tab, select the plugin from the list, and click the Configure button. Enter your license key and company name in this dialog. You will only need to do this once on a given machine. Alternately, you can use the registration function to register the plugin during a startup script.
Note: If you are running the plugin with FileMaker Server / FileMaker Web Publishing Engine, you must use the registration function to register the plugin, since there is no preferences dialog on FileMaker Server to enter the license key and company name. You will need to call the register function at the beginning of any script that is going to call plugin functions. This will ensure that you do not get demo mode errors.
We love to hear your suggestions for improving our products! If you are experiencing problems with this plugin, or have a feature request, or are happy with it, we'd appreciate hearing about it. Send us a message on our website, or email us!
When calling plugin functions as script steps, you will handle errors in the same manner you would any other FileMaker script step. Please see the FileMaker documentation for how to handle errors appropriately. Generally, if there is an error, our plugins will return an error code of 1552 when Get(LastError) is called. However, some plugin functions will return different error codes. If a function can return an error code other than a 1552, it will be documented with the description of the function below. In addition to the error code, you can also get the description of the error by calling Get(LastExternalErrorDetail)
You can also call our functions in a calculation dialog. In this case, error handling is done differently. If you decide to call plugin functions in a calculation dialog and you want to capture errors, see this page page for instruction on how to do so
This plugin does not have to be installed to use the 360Works SuperContainer Web Viewer add-on, but it allows you to automate certain features that would normally require user interaction.
The plugin supports uploading container fields into SuperContainer, or downloading into a local container field from SuperContainer. In addition, there are methods for deleting a file stored in SuperContainer, download files to the local drive, and for getting details about a file stored in SuperContainer.
This plugin is particularly useful for migrating data from container fields in an existing solution into SuperContainer.
Note: Instant Web Publishing clients should not use the plugin to upload files, because for IWP the plugin is on the server, so it can only access files on the server. This is probably not what you want! Instead, IWP clients should upload file via a web viewer which is placed on a layout. Your solution might have a separate layout for IWP uploads.
Important: you must call SCSetBaseURL before calling any plugin functions which interact with the SuperContainer server, passing the location of the server.
For example, if you are running the standalone SuperContainer server on your development machine, call this:
SCSetBaseURL("http://server.mycompany.com:8020/SuperContainer/Files")
Note that you pass the complete URL, up to the "Files" component. All other plugin functions accept a relative folder path as a parameter (NOT a complete URL). This is the folder on the server where the file is stored, or where you want it to be stored. It should not include the SuperContainer host, port, or action name. For example:
SCGetContainer("staff/portraits/42")
Generally you will want to call SCSetBaseURL
in your startup script. Once the plugin knows the complete URL to your server, the rest of the plugin functions only need to know the relative path on the server.
One thing to watch out for when using the plugin: Sometimes a plugin script will return before SuperContainer has finished processing the last action.
So you might upload a file with the SCSetContainer
plugin function, then immediately call SCGetInfo
before the previous action has completed.
One solution is to just put a pause script step in between the two actions.
The companion plugin should work with container references as well as as stored container fields.
fileType
parameter, you can allow the user to just select files, just select directories, or select both files and directories. The default behavior is to only allow file selection.
Set Variable[$path; SCChooseFile(Get(DesktopPath; "directories")]
Set Variable[$path; SCChooseFile(Get(DesktopPath; "files")]
Set Variable[$path; SCChooseFile(Get(DesktopPath; "files + directories")]
SCSetContainer(Asset::ID ; SCChooseFile);//uploads chosen file to location specific in Asset::ID field
When selecting directories, you can combine this function with SCScanDirectory to batch-import the contents of a directory. The following example prompts the user to select a directory, then scans that directory recursively (returning a list of all files in the directory).
SCScanDirectory ( SCChooseFile("" ; "directories" ) ; true)
NOTE: specifying a fileType of "directories" or "files + directories" will cause a non-native file dialog to be used on some platforms, as the native dialogs may not support directory selection.
initialPath
- optional path to set the initial dialog selection to. If empty, will default to the user's home directory.fileType
- whether to allow "files"
, "directories"
, or both "files + directories"
title
- optional title string to display as the title of the FileChooser dialogkeyValuePairs
- optional key=value
pairs. Options: useNative
, which you can set to false
to use a Java file dialog instead of a native file dialog.
If there is no file at folderPath
, this function will return an error.
Important: You must call SCSetBaseURL before calling this function to set the location of your SuperContainer server.
SCCopy[Folder Path:"/Products/current/prod1234";Destination Path:/Products/archive/prod1234;Filename(optional): ] //filename can be left empty
folderPath
- The folderPath of the file to copydestinationPath
- The folderPath of where you want to copy the original file tokeyValuePairs
- optional key=value
pairs. Options: filename
, example filename=myNewName.txt
.If there is no file at this folderPath, nothing is changed on the server.
Important: You must call SCSetBaseURL before calling this function to set the location of your SuperContainer server.
To delete a file from the local filesystem, use the SCDeleteLocalFile function instead.
#Do the delete SCDelete[Folder Path: "file/to/be/deleted/fileOne"] # Refresh the web viewer to show the empty web viewer Set Web Viewer [Object Name: "webviewer"; Action: Reload]
folderPath
- the unique identifier for a supercontainer file.To delete a file from the SuperContainer server, use the SCDelete function instead.
localFile
- path to the local file to deleteNOTE: If no destinationUrl is provided, the downloaded file will be stored in the user's temp directory, and will be deleted from the user's local drive when FileMaker exits.
Use caution when supplying a custom path, as this method will overwrite files with the same name!
Since this function returns a URL, it can be combined with the Open URL
script step to open the downloaded file, for example:
Open URL [SCDownload("Photos/12345")]
false
false
.true
to return the original, uncropped image.
filename
, the destinationFolder
, width
, and height
are then required, because these parameters are positional. Example:SCDownload ( "Photos/Original/" & Photos::Photo ID ; // Folder Path Get( DesktopPath ) & "MyPhotos/" ; // Destination folder 0 ; 0 ; //width & height parameters "filename=" & $fileName ; "returns=filepath" )
Important: You must call SCSetBaseURL before calling this function to set the location of your SuperContainer server.
folderPath
- The unique SuperContainer pathuserDefinedDestPath
- Optional URL or FileMaker path of the folder to download the file to (ie. /Macintosh HD/Users/Shared/Images)width
- Optional integer for pictures that represents the width of the image. If a width/height is specified, non-image resources will only download a filename, not the entire file.height
- Optional integer for pictures that represents the height of the image. If a width/height is specified, non-image resources will only download a filename, not the entire file.flags
- optional key=value
pairs. Options: selfSignedSSL
, returns
, filename
; example selfSignedSSL=1
.If there is no file at this folderPath, an empty result is returned.
Important: You must call SCSetBaseURL before calling this function to set the location of your SuperContainer server.
Set Field[Products::Images;SCGetContainer("/Products/Images/"& Products::ID);500;500]//downloads file with width of 500 and height of 500Please note that the optional parameters width, height, resolution, and page are integers and are positional so if you want to include a resolution but not a width and height your function call would look like so:
Set Field[Products::Images;SCGetContainer("/Products/Images/"& Products::ID);0;0;72]//downloads file with with original width and height but with 72 resolution
folderPath
- the unique identifier for a SuperContainer file.width
- optional width parameter. If the SuperContainer file is an image, it will be resized to this width. Pass in 0 to leave width unconstrained.height
- optional height parameter. If the SuperContainer file is an image, it will be resized to this height. Pass in 0 to leave height unconstrained.resolution
- optional resolution parameter. If the SuperContainer file is an image, the jpeg preview for it will be rendered at the specified resolution. If omitted the default resolution of 72dpi wil be used.Important: You must call SCSetBaseURL before calling this function to set the location of your SuperContainer server.
NOTE: A mounted or mapped filesystem-accessible storage location is required to open referenced folder. Otherwise, you should download the file to the local hard drive using SCGetContainer and open it there.macPath
- Mac OS X path to root SuperContainer storage locationwinPath
- Windows to root SuperContainer storage locationfolderPath
- The unique identifier for a SuperContainer file folderSet Field[Products::File Info;SCGetInfo(/Products/Images/"&Products::ID)]
You can specify additional metadata to retrieve by passing additional arguments to this function. See the 'additionalFields' documentation below for details.
SCGetInfo("/Products/Images/"&Products::ID ; "md5"; "width"; "height")Might return:
Lamp.jpg 51231 4/8/08 3:02:56 PM c7f47955c825ed83dfe2a6a2fac1a092 640 480
If there is no file at this folderPath, an empty result is returned.
Important: You must call SCSetBaseURL before calling this function to set the location of your SuperContainer server.
folderPath
- the unique identifier for a supercontainer file.additionalFields
- either md5, height, width, dimension, or pagecount.If [ SCSetContainer( Asset::ID ; theContainer ) = "ERROR" ] Show Custom Dialog ["Could not store this file"; SCLastError] End IfNote:This function will only work if the offended function call is called as a calculation. If calling as script steps please see the Error Handling/Reporting section above
If there is no file at oldFolderPath
, this function will return an error.
Important: You must call SCSetBaseURL before calling this function to set the location of your SuperContainer server.
To move a file on the local filesystem, use the SCMoveLocalFile function#Do the move Set Variable [$result; Value:SCMove( Get( LayoutTableName ) & "/" & ID ; Get( LayoutTableName ) & "/" & DestID; "filename=New Word Document.docx")] #Check for error during move If [$result = "ERROR" Show Custom Dialog ["Could not move file"; SCLastError] End If # Refresh the web viewer to show the new file Set Web Viewer [Object Name: "webviewer"; Action: Reload]
oldFolderPath
- The old folderPath of the file to movenewFolderPath
- The folderPath to move the file tokeyValuePairs
- optional key=value
pairs. Options: filename
, example filename=myNewName.txt
.To move a file on the local SuperContainer server, use the SCMove function.
SCMoveLocalFile( Get(DesktopPath)&"/test pictures/test.png"; Get ( DesktopPath )&"/test.png" ) //moves test.png from test pictures folder to desktop
sourceFile
- file or directory to be moveddestinationFile
- file or directory which sourceFile
is to be moved toemailAddress
- The user's email address to allow for support contactproblemDescription
- A description of the current issueSet Variable[$files; SCScanDirectory(Get(DesktopPath);True)//recursively scans every directory on the Desktop
path
- path to the directory to scanrecursive
- Pass in 1 to recurse into sub-directories, or pass 0 or empty to only return files in the top level directory. Does not recurse into sub-directories if this parameter is omitted.localhost
as the hostname:SCSetBaseURL[Super Container Url:"http://localhost:8020/SuperContainer/Files"; Username(optional): ; Password(optional): ]When using for live deployment, you should supply an actual hostname of IP address of the machine which will be running the shared SuperContainer instance. For example:
SCSetBaseURL[Super Container Url:"http://server.mycompany.com:8020/SuperContainer/Files"; Username(optional): ; Password(optional): ]If you supply a valid URL but there is not a running SuperContainer server at the host provided, the base URL will still be set, but an "ERROR" failure code will be returned (use
SCLastError
to get a detailed error message).
Remember that the default port number is 8020 for the standalone SuperContainer server, and 80 when deploying with FileMaker Server.
Typically, you should call this function in a startup script in your FileMaker database. It only needs to be called once per FileMaker launch, or anytime that the base URL changes.NOTE: If specifying named parameters like selfSignedSSL, the username and password fields are required because these parameters are positional. If username/password are unused, insert empty quotes ("") instead. For example:
Set Variable[$baseURL; Value: SCSetBaseURL("http://localhost:8020/SuperContainer/Files" ; "" ; "" ; "selfSignedSSL=1")
superContainerUrl
- The URL of the superContainer instance to be used by the plugin, e.g. http://fmpro.example.com:8020/SuperContainer/Files
.username
- optional username. If your SuperContainer server is set up with password protection, enter the username here.password
- optional password. If your SuperContainer server is set up with password protection, enter the password here.keyValuePairs
- optional key=value
pairs. Options: selfSignedSSL
, example selfSignedSSL=1
.certificatePathOrContainer
- A path or container field reference to an X509 server-side certificate. You may add more paths or certificate references if necessary (e.g., an entire certificate chain).Important: You must call SCSetBaseURL before calling this function to set the location of your SuperContainer server.
If you want to update the web viewer on a layout to show the newly uploaded file, add a "Set Web Viewer [Action: Reload]" script step to the upload script. This will cause an immediate update to be triggered.
filename=desired_name
to provide desired filename for the file.showProgress=false
to hide the progress bar during upload.Set Variable[$result = SCSetContainer( "Documents/D23" ; Documents::Legacy Container ; "filename=newName.txt" ; "selfSignedSSL=1" ; ) ] #Do the upload Set Variable [$result; Value:SCSetContainer( Get( LayoutTableName ) & "/" & ID ; SCChooseFile)] #Check for error during upload If [$result = "ERROR" Show Custom Dialog ["Could not upload file"; SCLastError] End If # Refresh the web viewer to show the new file Set Web Viewer [Object Name: "webviewer"; Action: Reload]
folderPath
- the unique identifier for a supercontainer file.data
- the data to be stored, typically a container field. Can also be a URL (ie. http://server/someFile or file:///Users/Shared/aFile) or a File path (ie. /Macintosh HD/Users/Shared/aFile or C:\Documents and Settings\aFile)params
- Additional optional parameters (filename)Example:
SCSetErrorCapture(True) // prevent dialogs
errorCapture
- set to true to suppress the default popups.2.95
.