Copyright 2007 by gINT Software. All rights reserved worldwide.
GR015.TXT
gINT Rules Code Samples - 015
Requires gINT version 8.1.016 or later.
NOTE: Code samples are provided free of charge and as-is. gINT Software makes no claim or warranty as to the accuracy of the samples. It is the responsibility of the user to ensure that the code performs as it should. Comments, suggestions, and error reports are appreciated.
Description
===========
Hides or unhides fields, tables, and groups based on the project type which is set in the PROJECT table. This rule is called on the "On Open Project in Input" system event and the "gINT Rules Procedure Leaving Tab" table event for the PROJECT table.
The project has fields, tables, and groups that are specific to Geotechnical and Environmental projects. The procedure checks for the existence of a field in the PROJECT table called "Project Type". If the type is "Combined" or blank, all fields, tables, and groups in the database will be shown. You will see:
Four fields in the POINT table:
Geotech Field 1
Geotech Field 2
Environmental Field 1
Environmental Field 2
Two tables under the Main Group:
Geotech Table 1
Environmental Table 1
Two Groups with two tables each:
Geotech
Geotech Table 2
Geotech Table 3
Environmental
Environmental Table 2
Environmental Table 3
On changing the "Project Type" field in the PROJECT table and moving to another table, the "gINT Rules Procedure on Leaving Table" event calls the same procedure called by the "On Open Project for Input" event and hides or displays the appropriate tables based on the contents of the "Project Type" field.
*************************************************
Revision History
================
28 May 2007:
Initial upload
*************************************************
INCLUDED FILES:
GR015.GLB:
gINT Rules code modules:
GR015 Main
ShowHideProjectObjects
Lookup Lists: GR015 PROJECT TYPE
gINT Rules on System Events
*************************************************
INSTALLATION PROCEDURE:
Copy the files wherever you prefer. To see the gINT Rules code modules you must either merge the GLB into your library (Utilities:Lib Merge/Copy) or change to the included library (File:Change Library).
*************************************************