Variables
See also

Description
Variables are system values that can be included within your procedures. They are referred to by their name and are enclosed in square brackets (e.g. [DATE]) and can be included in any option that supports variable (e.g. formulas, HTML text, update values, e-mail messages). The variable reference is automatically replaced with its value when the procedure in which it is used is executed. QuickModules.com supports four types of variables: System Variables, Table Fields, Form Variables, and Procedure Links.

System Variables
QuickModules.com supports the following system variables:

  • [DATE]: The current date ( Greenwich Mean Time )
  • [TIME]: The current time ( Greenwich Mean Time )
  • [LINK]: The URL to the module being executed currently

Table Fields
Values of fields in the current record of a table can be referenced as variables. The syntax is [TABLE.FIELD]. For instance, [CUSTOMER.NAME] is a reference to the 'NAME' field in the 'CUSTOMER' table. Some procedures (e.g. Data Entry Forms) are associated with a particular table. In those procedures, a reference to the associated table does not need to be prefixed with a table name. For instance, if the table 'CUSTOMER' is the associated table, then [NAME] and [CUSTOMER.NAME] are equivalent.

In addition to the names of the fields, each table contains the following predefined variables:

  • [table.RecId]: Its value is an string unique to that record. No two records have the same RECID value. Use RECID to associate records to each other. [CUSTOMER.RECID] for instance is a unique identifier to the current record in the CUSTOMER table.
  • [table.RecordCount]: A number whose value is the number of records in the tables current selection. Not that this is not necessarily the count of all records in the table; if the current selection has been filtered by a search, then only the number of records returned by the search will be counted. To retrieve the number of all records in the table, perform an empty search on the table and then retrieve the value of [RecordCount].

Form Variables
QuickModules.com allows you to pass parameter values to your modules when being accessed using an HTML link. Each form variable included in the link is assigned a particular variable with the same name in the module. Those variables are referenced by prefix them with the 'VAR.' prefix. For instance, [VAR.CUSTOMER_ID] refers to the value of the 'CUSTOMER_ID' form variable. As an example, if the link to your module is:

http://www.QuickModules.com/scripts/run?Id=2

and you want to pass the customer id '45654' and the order number '5345', then you can modify your link accordingly to include the parameters as form variables:

http://www.QuickModules.com/scripts/run?Id=2&CustomerId=45654&OrderNumber=4345

In your module procedures, you may reference the variables as [VAR.CustomerId] and [VAR.OrderNumber]. passing parameters is important if you want to communicate data from one module to another, or if you want to do searches or updates on predefined values.

Procedure Links
QuickModules.com allows you to retrieve the link to any procedure in the module for the current session. This is done through variables starting with the prefix 'PROC.'. The syntax is [PROC.Procedure Name]. For instance, to get the value of a procedure called 'Update All Customers', then you can use the variable [PROC.Update All Customers]. Procedure links are useful if you want to create a customized link to a particular procedure. You can do this using a Customized HTML procedure. In you HTML, you can include a procedure link variable to create a link from text or an image to one of the procedures in the module. The procedure must be in the module being currently executed, and the link is valid only for the duration of the session. If the session expires, then the link is no longer valid.

See Also
Formulas
Procedures
Customized HTML

 

Copyright © 2001 RIQ Technologies Inc. All rights reserved.
Copyright Policy, Privacy Policy, License & Terms of Use