The present section describes how to work with folders using scripts and variables, as well how to use the Link to Folder field.
We will analyze automating of work with folders by the example of a simple storehouse database. Let’s imagine we have two types of records: products and operations (receipts and expenditures of products). For every product there is a separate folder where operations for the given product are stored:
The Products Catalog folder contains records of the Product type:
The Product form has the following fields:
The script of this button creates a record of the Operation type in the folder specified by the [$f] variable. The [$f] variable, in its turn, is set in the first string of the script from the Folder field.
The given script performs jumping to the folder set by the [$f] variable.
In this script the application calculates the sum of the Quantity field for all operations stored in the folder set by the Folder field, and displays the result of work in the MessageBox window.
Therefore, you can use the value stored in the field of the Link To Folder type:
Copyright (C) 2001-2010 Binary Brilliant Inc. All Rights Reserved.