Plug-Ins 101

From 360Works Product Documentation Wiki
(Difference between revisions)
Jump to: navigation, search
(Created page with "==Overview== ===Intended audience=== This guide is intended for FileMaker users and developers who are new to using plug-ins with FileMaker Pro and FileMaker Server. It explai...")
 
(Getting Log Files)
(48 intermediate revisions by 8 users not shown)
Line 1: Line 1:
==Overview==
+
This is a guide is for FileMaker users and developers who are new to using plug-ins with FileMaker Pro and FileMaker Server. It explains concepts that are applicable to all 360Works plug-ins, and to many FileMaker plug-ins in general. If you are using plugins that were released prior to May 2017 please see [[Legacy Plugins 101 | this page]].
===Intended audience===
+
[[File:PluginDialog.png|right|thumb|400px|The FileMaker Plug-In dialog showing three 360Works plug-ins, with one disabled]]
This guide is intended for FileMaker users and developers who are new to using plug-ins with FileMaker Pro and FileMaker Server. It explains concepts that are applicable to all 360Works plug-ins.
+
  
 +
==What is a plug-in?==
  
===What is a plug-in?===
+
A plug-in is a file that can be installed to add new functionality to FileMaker. Plug-ins do not stand alone, and are instead only used to extend FileMaker's capabilities. A plug-in's functionality can range from improving FileMaker's ability to send emails to allowing FileMaker to run custom Groovy code at will. By allowing developers to expand the functionality of FileMaker without changing its core structure, plug-ins ensure that FileMaker maintains its broad user group while meeting very specific needs. Without plug-ins, users would need to purchase additional stand-alone software that may not interface with existing FileMaker databases.  By utilizing FileMaker's standard functions to perform non-standard tasks, plug-ins help ensure that your information is accessible, organized, and integrated.
A plug-in is a file that can be installed to add new functions to the calculation dialog in FileMaker. In general, plug-ins do NOT add new script steps or change the overall behavior of FileMaker Pro. They do nothing by themselves, they are only useful when installed some place where they can be accessed by FileMaker.
+
  
 
 
'''Advantages of Plug-ins over….'''
 
 
Plug-ins are the solutions to specific user needs not available in Filemaker's standard features.  By allowing developers to expand the functionality of FileMaker without changing its core structure, plug-ins ensure that FileMaker maintains its broad user group while meeting very specific needs.  Without plug-ins, users would need to purchase additional stand-alone software that may not interface with existing FileMaker databases.  By utilizing FileMaker's standard functions to perform non-standard tasks, plug-ins help ensure that your information is accessible, organized, and integrated.
 
 
 
==Getting Started with Plug-Ins==
 
==Getting Started with Plug-Ins==
===Demo copies and Registration===
 
Each 360Works plug-in is available as a demo version that allows users to evaluate a plug-in.  These demonstration copies will generally have limitations on their use such as an expiration date, a time-out timer (typically 2 hours), or limited access to functions.
 
 
Registering your plug-in gives you full access to the plug-in’s functions.  When you purchase a plug-in from 360Works, you will be given a license key to register your product.
 
 
Plug-ins need to be registered in the location that they will be used, whether FileMaker Pro, FileMaker Server, and FileMaker Server Web Publishing.
 
 
If you are using the plug-in in FileMaker Pro, you can register your plug-in using FileMaker’s menu.  Just select FileMaker Preferences > Plug-ins > Select Plug-in > Configure.  Enter the registration name and license key in the fields provided.  This information is case sensitive, so be sure to copy directly from your confirmation email.
 
 
http://demo.360works.com/wiki/plugins1013.png]]
 
 
 
If you are using the plug-in as part of a network, where multiple users will be connecting to your database and accessing the plug-in, or registering the plug-in with FileMaker Server or FileMaker Server Web Publishing, you’ll need to register the plug-in using a script.  We recommend putting this in your database startup script, so that the plug-in will always be registered when new users connect to your database.
 
 
 
To create the script, open your database and select Scripts > Manage Scripts.  This will launch the scripts manager.
 
 
 
http://demo.360works.com/wiki/plugins1015.png
 
 
 
 
 
 
 
 
 
 
 
Click “New” in the lower left corner.  Name the script in the Script Name Field, then double-click “Set Variable” from the menu on the left.  Now click “Specify” in the lower right.  This will allow you to define the script’s process.  In the Name field, enter $register.
 
 
 
http://demo.360works.com/wiki/plugins1017.png
 
 
 
 
Click the “Specify” button beside the Value field to bring up the Calculation editor.  This is where you can access the plug-in features.  In the drop-down menu beside “View” in the upper right, select External Functions.  The external functions view is where you can access your plug-in’s capabilities.
 
 
 
http://demo.360works.com/wiki/plugins1019.png
 
 
 
 
 
For this script, double click the pluginRegister( key ; registeredTo ) function, where plugin is the name of your plug-in.  This moves the function to the function editor window, where you can replace “key” with your license key and “registeredTo” with the registration name from your invoice. Click OK in the calculation window and OK in the “Set Variable” option window, then click Save when prompted.
 
 
 
http://demo.360works.com/wiki/plugins10111.png
 
 
 
 
 
 
 
You’ve now created a registration script to run on startup when your database loads.  This ensures that the plug-in is registered across FileMaker Pro, FileMaker Server, and FileMaker Server Web Publishing, as well as on any client computers who access your database.  This is also the process you will use to call other plug-in functions when building your scripts.
 
 
 
===Plug-in Installation===
 
===Plug-in Installation===
  
Installing your 360Works plug-in is very straightforward, although there are differences between installing on a client machine using FileMaker Pro, a server using FileMaker Server, or on the FileMaker Server Web Publishing Engine.
+
Refer to our [[Plug-In Installation]] page.
+
  
''Client Install''
+
(For further reference, check FileMaker's official [http://help.filemaker.com/app/answers/detail/a_id/10097/~/installing-and-updating-plug-ins-in-filemaker-pro plug-in installation docs])
Open the .zip file from your plug-in download.  Locate the appropriate plugin for your operating system inside the MAC or WIN folder.  Drag the plugin to your FileMaker Extensions Folder.
+
+
  
''Server Install''
+
===Licensing===
When installing a plug-in on FileMaker Server, follow a similar process.  Drag the appropriate extension to FileMaker Server/Database Server/Extensions.
+
+
  
''WPE Install''
+
Please refer to our [[Plug-In Licensing]] page.
Install plug-ins on the Web Publishing Engine in order to access them from Instant Web Publishing or Custom Web Publishing. Installation is similar: drag the appropriate plugin to FileMaker Server/Web Publishing/publishing-engine/wpc/Plugins.  If the Plug-ins folder does not exist, create one.
+
+
  
''AutoUpdate (install on multiple client machines)''
 
If you have a plug-in that needs to be installed on multiple client machines accessing FileMaker Server, you can use the Auto Update function to streamline the process.  For more information on the process, visit fmp7://autoupdate.360works.com/AutoUpdate360Works.
 
 
 
===Using Plug-ins===
 
===Using Plug-ins===
  
Line 98: Line 25:
 
Scripts are commands that cause FileMaker to perform specific tasks.  They can be simple or complex, made of variable script steps.  Script steps are generally composed of a Function, which defines the action that the script performs, and Variables, which define the parameters of the action.  As plug-ins are used within FileMaker, you can use scripts to control the actions of plugins.
 
Scripts are commands that cause FileMaker to perform specific tasks.  They can be simple or complex, made of variable script steps.  Script steps are generally composed of a Function, which defines the action that the script performs, and Variables, which define the parameters of the action.  As plug-ins are used within FileMaker, you can use scripts to control the actions of plugins.
 
   
 
   
To create a script, open the script manager from the menu bar of your FileMaker database. This opens the script manager, where you can create new scripts or edit existing ones using the buttons in the lower left. These buttons open the script editor, which show all of the steps in a script.  On the left is a list of all possible scripts. These scripts define how the script will perform an action. Double clicking any of these will add the step to your script.  To further define the function and parameters of the script, select a script step in the editor window, then click the “Specify” button.
+
To create a script, open the script manager from the menu bar of your FileMaker database. This opens the script manager, where you can create new scripts or edit existing ones. To create a script, click the "+" in the upper left corner. To edit an existing script, click on it in the list of scripts on the left and then start editing it. To add a script step to the a script, double click it and it will add the step to your script. You can also just start typing the name of the script step or use its type-ahead designation. Available script steps are listed on the right of the script workspaceIn FileMaker 16, plugin functions will be listed here ( highlighted in red in the image below). You can also call plugin functions by setting the plugin function as the value of the variable. That option is detailed on [[Legacy_Plugins_101#Creating_Scripts.2C_Calling_Functions.2C_and_Setting_Variables | this]] page.  Either option is completely viable but it will be up to you to decide when either option is appropriate. To further define the parameters of the script step, click the options button next to the script step. This will open a drop down menu where you can specify  the value of the parameters as well as a few other options ( see image below).
  
  
http://demo.360works.com/wiki/plugins10113.png  
+
[[File:ScriptWorkspace16.png | 700px]]
  
  
 
   
 
   
+
Click "Specify" next to the parameters to give them a value. This will open a calculation dialogue. Give the parameter the appropriate value and click ok. You can also set a field or a variable to the return value of the function by checking the "Results" checkbox (see screen shot below)
This brings you to the Specify Calculation window. On the left will be a list of all functions accessible to FileMaker. These functions provide the actions that your script will perform.  '''To access the Functions associated with Plug-ins, select “External Functions” in the View drop-down'''. Adding a function to a script step is known as “calling” that function.
+
+
  
The second part of a script step is known as a variable.  This tells the script where to perform the function, and gives the authorization to access this location. Variables are set in the parentheses behind the function in the Specify Calculation window.  
+
[[File:ResultsWindow.png | 400px]]
  
 +
===Error Handling/Reporting===
 +
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)
  
http://demo.360works.com/wiki/plugins10114.png
+
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
  
 +
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 [http://docs.360works.com/index.php/Error_handling this page] for instruction on how to do so
  
 
+
==Troubleshooting/Common Plugin Issues==
 
+
 
+
Entering this information is known as setting a variable.  This process will allow you to write a script calling a specific function with set variables.
+
 
+
 
+
===Error Checking===
+
 
+
You may get a result that says "ERROR" or "?" It is important that you integrate error checking into your solution. If you get "?" as a result, the plug-in is not installed correctly. "ERROR" may be a result from a  variety of issues. Use the ''plugin''LastError function, where ''plugin'' is replaced with the specific product you are using, to get more information about possible errors.
+
 
+
 
+
Use these results and functions to create error handling as part of your script:
+
 
+
 
+
Set Variable [ $result = MyPluginFunction("x" ; "y" ; "z") ]
+
If [ $result = "ERROR" ]   
+
Show Custom Dialog [ "An error occurred: " & pluginLastError ]
+
End If
+
 
+
+
  
 
==Getting Help==
 
==Getting Help==
  
'''Individual Plug-in Support'''
+
===Individual Plug-in Support===
  
Many questions about 360Works plug-ins can be answered in one of two places: the plugin documentation or the product support wiki.  To access the documentation, you can either view the documentation.html file within the plugin folder, or visit http://www.360works.com/products. Choose your product from the left sidebar, then click the “View Documentation” button.
+
Many questions about 360Works plugins can be answered in one of two places: the plugin documentation or the product support wiki.  To access the documentation, you can either view the documentation.html file within the plugin folder, or visit http://www.360works.com/products. Choose your product from the left sidebar, then click the “View Documentation” button.
 
   
 
   
You can also check our [http://wo.360works.com/cgi-bin/support/productsupport.cgi/ Product Support Wiki] for answers to common plugin questions or visit the [http://fmforums.com/forum/forum/121-360-works/ FMForums 360Works section]. If your question doesn’t appear in the forums, create a new post and a support representative will respond.
+
You can also check our [http://docs.360works.com/index.php/Main_Page Product Support Wiki] for answers to common plugin questions or visit the [http://fmforums.com/forums/forum/121-360-works/ FMForums 360Works section]. If your question doesn’t appear in the forums, create a new post and a support representative will respond.
  
  
  
http://demo.360works.com/wiki/plugins10116.png
+
[[File:plugins10116.png]]
  
  
'''Contacting 360Works'''
+
===Contacting 360Works===
  
 
Sometimes you may have questions that the documentation cannot answer.  You can contact 360Works support in a variety of ways.  Our office is open 10am – 6pm ET, and you can reach us at 770-234-9293.  
 
Sometimes you may have questions that the documentation cannot answer.  You can contact 360Works support in a variety of ways.  Our office is open 10am – 6pm ET, and you can reach us at 770-234-9293.  
 
   
 
   
You can also email us at any time at plugins@360works.com.
+
You can also email us at at support@360works.com.
+
  
'''Helping Us Help You'''
+
===Helping Us Help You===
  
 
When we provide support it is important for us to have the most accurate information available.  To do so, we may ask you for a few items that may be helpful. If possible, please have this information available when contacting 360Works Support.
 
When we provide support it is important for us to have the most accurate information available.  To do so, we may ask you for a few items that may be helpful. If possible, please have this information available when contacting 360Works Support.
 
   
 
   
  
'''Product Information'''
+
===Product Information===
  
 
The version and license of the plug-in you are using, the version of FileMaker Pro or FileMaker Server that you are using, and your operating system.
 
The version and license of the plug-in you are using, the version of FileMaker Pro or FileMaker Server that you are using, and your operating system.
  
  
http://demo.360works.com/wiki/plugins10118.png
+
[[File:plugins10118.png]]
  
  
Line 172: Line 80:
 
   
 
   
  
'''Bug Report'''
+
===Bug Report===
  
 
If a plug-in is malfunctioning, a bug report is immensely helpful to identify the problem. To generate a report, logout then log back in to FileMaker. Reproduce the issue and immediately go to FileMaker Pro Preferences > Plug-ins.  Select the plug-in, click “Configure” then click “Report a Bug”.  This will send a bug directly to our support team who will contact you to follow up.
 
If a plug-in is malfunctioning, a bug report is immensely helpful to identify the problem. To generate a report, logout then log back in to FileMaker. Reproduce the issue and immediately go to FileMaker Pro Preferences > Plug-ins.  Select the plug-in, click “Configure” then click “Report a Bug”.  This will send a bug directly to our support team who will contact you to follow up.
 
   
 
   
  
'''Getting Log Files'''
+
===Getting Log Files===
 
+
Log files help to tell us what is happening when a plug-in malfunctions.  If you are asked to provide a log file, you can do so easily by navigating to the correct location based on your operating system and FileMaker version.
+
+
 
+
''If using FileMaker Pro:''
+
 
+
OS X:
+
/Users/userName/Library/Logs/360Plugin Logs/360Plugins_XXXXX.log
+
+
 
+
Windows XP or S2003:
+
C:\Documents and Settings\<userName>\My Documents\360Plugin Logs\360Plugins_XXXXX.log
+
+
 
+
Windows Vista, 7, or S2008:
+
C:\Users\<userName>\Documents\360Plugin Logs\360Plugins_XXXXX.log
+
+
 
+
''If Using FileMaker Server:''
+
 
+
OSX:
+
/Library/FileMaker Server/Logs/360Plugin Logs/360Plugins_XXXXX.log
+
+
 
+
Windows XP or S2003:
+
C:\Documents and Settings\Default User\My Documents\360Plugin Logs\360Plugins_XXXXX.log
+
+
  
Vista, 7, or S2008:
+
See [http://docs.360works.com/index.php/Plugin_log_files this page] for log locations.
C:\Users\Default User\Documents\360Plugin Logs\360Plugins_XXXXX.log
+

Revision as of 00:55, 9 May 2017

This is a guide is for FileMaker users and developers who are new to using plug-ins with FileMaker Pro and FileMaker Server. It explains concepts that are applicable to all 360Works plug-ins, and to many FileMaker plug-ins in general. If you are using plugins that were released prior to May 2017 please see this page.

The FileMaker Plug-In dialog showing three 360Works plug-ins, with one disabled

Contents

What is a plug-in?

A plug-in is a file that can be installed to add new functionality to FileMaker. Plug-ins do not stand alone, and are instead only used to extend FileMaker's capabilities. A plug-in's functionality can range from improving FileMaker's ability to send emails to allowing FileMaker to run custom Groovy code at will. By allowing developers to expand the functionality of FileMaker without changing its core structure, plug-ins ensure that FileMaker maintains its broad user group while meeting very specific needs. Without plug-ins, users would need to purchase additional stand-alone software that may not interface with existing FileMaker databases. By utilizing FileMaker's standard functions to perform non-standard tasks, plug-ins help ensure that your information is accessible, organized, and integrated.

Getting Started with Plug-Ins

Plug-in Installation

Refer to our Plug-In Installation page.

(For further reference, check FileMaker's official plug-in installation docs)

Licensing

Please refer to our Plug-In Licensing page.

Using Plug-ins

Think of plug-ins as the tools you need to build a specific solution within FileMaker. For example, purchasing 360Works’ Plastic plug-in will not give you an out of the box point of sale system. However, using the tools that Plastic provides and using FileMaker’s existing functions will allow you to build your system from the ground up.

Creating Scripts, Calling Functions, and Setting Variables

Scripts are commands that cause FileMaker to perform specific tasks. They can be simple or complex, made of variable script steps. Script steps are generally composed of a Function, which defines the action that the script performs, and Variables, which define the parameters of the action. As plug-ins are used within FileMaker, you can use scripts to control the actions of plugins.

To create a script, open the script manager from the menu bar of your FileMaker database. This opens the script manager, where you can create new scripts or edit existing ones. To create a script, click the "+" in the upper left corner. To edit an existing script, click on it in the list of scripts on the left and then start editing it. To add a script step to the a script, double click it and it will add the step to your script. You can also just start typing the name of the script step or use its type-ahead designation. Available script steps are listed on the right of the script workspace. In FileMaker 16, plugin functions will be listed here ( highlighted in red in the image below). You can also call plugin functions by setting the plugin function as the value of the variable. That option is detailed on this page. Either option is completely viable but it will be up to you to decide when either option is appropriate. To further define the parameters of the script step, click the options button next to the script step. This will open a drop down menu where you can specify the value of the parameters as well as a few other options ( see image below).


ScriptWorkspace16.png


Click "Specify" next to the parameters to give them a value. This will open a calculation dialogue. Give the parameter the appropriate value and click ok. You can also set a field or a variable to the return value of the function by checking the "Results" checkbox (see screen shot below)

ResultsWindow.png

Error Handling/Reporting

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

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 for instruction on how to do so

Troubleshooting/Common Plugin Issues

Getting Help

Individual Plug-in Support

Many questions about 360Works plugins can be answered in one of two places: the plugin documentation or the product support wiki. To access the documentation, you can either view the documentation.html file within the plugin folder, or visit http://www.360works.com/products. Choose your product from the left sidebar, then click the “View Documentation” button.

You can also check our Product Support Wiki for answers to common plugin questions or visit the FMForums 360Works section. If your question doesn’t appear in the forums, create a new post and a support representative will respond.


Plugins10116.png


Contacting 360Works

Sometimes you may have questions that the documentation cannot answer. You can contact 360Works support in a variety of ways. Our office is open 10am – 6pm ET, and you can reach us at 770-234-9293.

You can also email us at at support@360works.com.

Helping Us Help You

When we provide support it is important for us to have the most accurate information available. To do so, we may ask you for a few items that may be helpful. If possible, please have this information available when contacting 360Works Support.


Product Information

The version and license of the plug-in you are using, the version of FileMaker Pro or FileMaker Server that you are using, and your operating system.


Plugins10118.png


This shows the License Type (Enterprise License) and Version (1.56). Also notice the “Report a bug” button.


Bug Report

If a plug-in is malfunctioning, a bug report is immensely helpful to identify the problem. To generate a report, logout then log back in to FileMaker. Reproduce the issue and immediately go to FileMaker Pro Preferences > Plug-ins. Select the plug-in, click “Configure” then click “Report a Bug”. This will send a bug directly to our support team who will contact you to follow up.


Getting Log Files

See this page for log locations.

Personal tools
Namespaces

Variants
Actions
Plug-in Products
Other Products
Navigation
Toolbox