Communication Between Modules
See also

Description
It is sometimes useful to be able to communicate between between modules. This allows you to build an online application which consists of more than one module. Communication is useful because it allows different modules to synchronize according to common data. The way to communicate is to place a link from one module to another, and pass information using form variables. Suppose you want to call module B from module A, and the link for module B is:

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

This link is visible on the 'Edit Module' screen for module B. You can go to this screen by clicking on the 'Modules' link in the toolbar on the left to obtain the list of all modules in your account, then clicking on the 'Edit' bullet (Edit symbol) to the left of the module name in the list. Of course, you need to have access to module B enabled by checking the 'Allow access to this module through a URL link' option in the 'Edit Module' screen.

To call module B from module A, you need to create a reference from a particular procedure in module A to the above link. You can do this in the HTML text of and HTML Text procedure, or in the footer of a Report procedure. For instance, you can have something like:

<a href="http://www.QuickModules.com/scripts/run?Id=2_171_ASCYG">Run Module B</a>

The above HTML code will add a link that reads 'Run Module B' to the procedure in which it was placed. Now to pass some information to module B, you need to add a form variable:

<a href="http://www.QuickModules.com/scripts/run?Id=2_171_ASCYG&City=Denver">Run module B</a>

The above modification now passes a variable called 'City' to module B. This, however, passes a constant value ('Denver' in this case), which does not help much to synchronize data between the two modules. To pass a value from table in module A, you can have something like:

<a href="http://www.QuickModules.com/scripts/run?Id=2_171_ASCYG&City=[Users.City]">Run module B</a>

The above link places the variable [Users.City] as part of the link. This variable will be replaced with its actual value, which is the value of field 'City' in the table 'Users'. This way, module B will receive a value for city depending on the value of the current user's city in module A. In module B, the value can be accessed by using the variable [VAR.City]. This variable can be used in a search or an update or anywhere there is a need to know the value of the variable City from module A.

See Also
Variables

 

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