DocuBin Developer

From 360Works Product Documentation Wiki
Revision as of 21:20, 24 July 2012 by Administrator (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

DocuBin - Developer

Since we plan to release fixes and updates to DocuBin, we wanted to have a way for developers to integrate DocuBin into their solutions without having to make any actual changes to DocuBin. We have extended DocuBin's feature set to help achieve this goal.

Unlocking DocuBin

  1. Open DocuBin with a DocuBin admin account.
  2. Select the menu option "About DocuBin…", which can be found under the menu "FileMaker Pro (Advanced)" on Macs, and under the menu "Help" on Windows.
  3. Select the option "Unlock."
• If this is the first time you are unlocking DocuBin, enter a password for the developer account, and click "Login". DocuBin will now be unlocked.
• If you have previous unlocked DocuBin (starting in version 1.0038) DocuBin will now be unlocked. Enter the developer password and click "Login"

Developer Scripts

The scripts below can be integrated into your FileMaker solution. Please refer to the Sample.fp7 database that came with your DocuBin download for examples.

  • DocuBin - Add File ( Path ; File )
  • DocuBin - Add Folder ( Path )
  • DocuBin - View Content ( ContentIDs )

Note: To check the script result use GetValue ( Get ( ScriptResult ) ; 1 ). If the script returns 1 then it completed successfully. If it returns FALSE, use GetValue ( Get ( ScriptResult ) ; 2 ) for the error message.

The 'Add' scripts are compatible with Web Publishing and FileMaker Server, and require the Scribe, License Check, and SuperContainer Companion Plugins to be installed in their respective locations:

Web Publishing FileMaker Server/Web Publishing/publishing-engine/wpc/Plugins

FileMaker Server FileMaker Server/Database Server/Extensions

Developer scripts cannot be run in demo mode.


Template Scripting

Template Scripts allows you to push documents stored in DocuBin to your FileMaker database using your very own scripts. For example purposes the following directions will use the external FileMaker database Sample, which is included in your download. "Sample" has an external file reference to DocuBin, and one script named Open Projects.

  1. Login to DocuBin with the developer account.
  2. Select the menu option "DocuBin Settings…", which can be found under the menu FileMaker Pro (Advanced) on Macs, or under the menu Help on Windows.
  3. Select Templates. Click the plus button [+] to create a new template.
  4. Give your template a name, and create one label with the name Project Code. The name of your label is important and will be used later.
  5. Because you logged in as a developer, you should see a section called Developer at the bottom of the layout, with two fields External FileName and External Script Name. Enter Sample as the filename, and Open Projects as the script name.

DocuBin is now configured to use the external script Open Projects from the database Sample whenever this template is used.

  1. Close the Settings window, and open one of the files you have inserted into DocuBin. If you have not inserted any files yet, now would be a good time to start.
  2. Select the template you just created. You should now see a link called Open Projects, the label Project Code, and a field where you can enter a Project Code. Type 1000 into this field.
  3. Click the link Open Projects. If the Sample database is not open FileMaker will ask you to locate it. Remember, it is in your DocuBin download folder.
  4. If everything worked right you should be looking at Project 1000 in the Sample database, and in the portal you should see the name of the file you were looking at in Docubin. Magic! Take a look at the script in the Sample database to see how it works.
Personal tools
Namespaces

Variants
Actions
Plug-in Products
Other Products
Navigation
Toolbox