Script Triggers

CloudContainer can trigger FileMaker scripts when files are inserted or deleted from a container. This feature uses the JavaScript integration features of FileMaker 19 and later.

To enable this functionality, you must check the “Allow JavaScript to perform FileMaker scripts” checkbox in the Web Viewer configuration screen.

Script Trigger Parameters

When called, the scripts will receive a script parameter to help you know which container the action took place in.

Script Paramters:

On Delete – A simple string of the container ID from which the file was deleted.


On Insert – JSON showing the container ID the file was inserted into and the name of the inserted file.


  "containerId": "FE63E27D-769C-4ECA-9AD3-DF6F67FD3F8A",
  "filename": "myfile.jpg"

Customizing Script Triggers

By default, CloudContainer will attempt to call scripts named BFCC_OnFileInserted and BFCC_OnFileDeleted when files are inserted and deleted respectively. The scripts which are called can be customized by passing additional query parameters to your CloudContainer URL. Set the “onInsert” and “onDelete” query parameters to the name of the script you would like to trigger.

These can be appended on to the end of the BFCC_Container custom function from the demo file for easy configuration.

BFCC_Container( Document::uuid ) & "&onInsert=MyCustomInsertScript&onDelete=MyCustomDeleteScript"