Close

To Integrate the ACF functions into your client application.

Most FileMaker applications have some table with only one record to store preference and such. We need to add some fields to this table:

  • ACF_pack1
  • ACF_pack2
  • ACF_pack3
  • ACF_pack4
  • ACF_prototypes
  • ACF_Console
  • ACF_autoupdateConfig – This is conditional if you want to use the auto-update feature.

ACF_pack1…4 are just text fields containing your ACF binaries as Base64 text. You might have as many as you want, extending with more fields. Remember, you can have many ACF functions in each pack.

ACF_prototypes are for showing the prototypes of the loaded ACF_binaries

ACF_Console is to retrieve the console output when debugging.

The optional ACF_autoupdateconfig – is used to store the encrypted config object for the document service used to deploy binaries. The binaries can also be copied and pasted into the service layout manually.

Then we need a service layout. It is a simple layout used by developers to load binaries into the fields. The layout has some tabs to insert the binaries, and one for the prototypes, and one for the optional config object.
A button to load the binaries, to retrieve the prototypes, and one to test the connection to the document service.

The client app service layout for the developers

In the startup script, we have two script steps:

  • Register the ACF_Plugin
  • Load the ACF binaries from the preferences.
Set Variable [ $$xx ; Value: ACF_RegisterPlugin ( "Your Company"; "ACF_Plugin DEV6.500 -  
========LICENCE BEGIN======
QB25ZD76dm08rihIIQdq0ihfOUE1CUxn+6OQjRdfpYY6/BSCeqle5
pAp3dhn/O6nxp1S8L1bIo2nqNoCXk/+QfHYX5etc===
======= LICENCE END =======" )
Set Field [ Configuration::ACF_Pack_prototypes ; 
Let( [   
v = If (not IsEmpty ( Configuration::ACF_Pack1) ; ACF_Install_base64Text( Configuration::ACF_Pack1 ); "") ;   
v = v & If (not IsEmpty ( Configuration::ACF_Pack2) ; ACF_Install_base64Text( Configuration::ACF_Pack2 ); "") ;   
v = v & If (not IsEmpty ( Configuration::ACF_Pack3) ; ACF_Install_base64Text( Configuration::ACF_Pack3 ); "") ;   
v = v & If (not IsEmpty ( Configuration::ACF_Pack4) ; ACF_Install_base64Text( Configuration::ACF_Pack4 ); "")
];
ACF_GetAllPrototypes
) ] 
The Prototypes – to cut and paste into your scripts.

If you intend to use the document service for auto-update the binaries, you can look at the example databases how to set this up. It is a small script used to load the binaries from the encrypted store. The script can be edited to fit your particular need. The Config object used to access the encrypted binaries looks like this:

Then you are ready to go.

See the example databases how this is set up. You can copy everything you need from the example databases.