User Tools

Site Tools


tplextensionglobalbusinessrules.htm
Navigation:  Templates > Guide to all Templates > Extension Templates > Business Rules Manager - Global Extension Settings >====== Business Rules Manager ============ Global Extension Settings ====== Previous pageReturn to chapter overviewNext page

In Clarion terms, a business rule refers to your business data values stored through the application and to the constraints on attempted changes to those data values.

Business rules are precise statements that describe, constrain, and control selected data elements within your application.

The Global Extension allows you to define rules that can be used throughout your application. In each procedure, you can choose to override all, or part, of these business rules.

The Business Rules Manager template provides the following global prompts:

Mode:

Original/Clone selection

The Global Extension operates in one of two modes. In Original mode, all of the prompts described in this Help topic appear. When code is generated, the information entered is exported to a file. In Clone mode, only the Mode prompts appear. The extension imports rules information from the file.

This feature allows you to use the Global Extension in multiple-DLL projects without having to re-enter business rules for each DLL.

Rules File Name

Enter a name for the file, which is exported in Original mode and imported in Clone mode. The extension for this file will always be .brf.

All Rules:

The Business Rules Manager template provides to the user at runtime a display window containing a list of rules, and displays any errors made (rules broken) based on the data entered (or not entered).

Default Description

Enter a default description to use for the title bar of this window.

Error-indicator image

Enter an icon image to use that will identify rules errors to the user within the rules list.

Default distance from right

Enter a number in pixels that will separate the error indicator image from the specific rule description.

Global Rules

Press this button to access the Global Rules dialog

View Rules Icons

This group allows you to specify icons to be displayed in the Rules List dialog window. You can designate an icon for the Header (top element in a rules tree ' normally the Default Description), Valid Rule (Rule names that are validated), and Broken Rule (Rule names that are not validated).

When any Rule is broken

Regardless of where the Rules Set is defined (Global or Local), the settings here designate specific controls that must be disabled or hidden anytime that a rule is broken. These settings can be overridden on the procedure level.

Disable Form “SaveButton”

Check this box to disable any SaveButton control template when a rule is broken.

Hide Browse “InsertButton”

Check this box to disable any InsertButton that is a populated component of the Browse Update control template when a rule is broken.

Hide Browse “ChangeButton”

Check this box to disable any ChangeButton that is a populated component of the Browse Update control template when a rule is broken.

Hide Browse “DeleteButton”

Check this box to disable any DeleteButton that is a populated component of the Browse Update control template when a rule is broken.

NoteBox.jpg

The specified controls above may be disabled or hidden when the window is first opened, after a rule check reveals one that is broken.

All Rules ' Other Controls

Press this button to display a dialog that allows you to hide/unhide or enable/disable special controls anytime that a rule is broken.

Initialize User Rules

Check this box to allow inclusion of a set of rules that are read from an external file. This file must use a TopSpeed format, and can be defined internally or declared in a dictionary. If the file is declared in a dictionary, it must have 3 column names defined as follows:

Control       STRING(128)

Description   STRING(256)

Expression    STRING(512)

User rules file name

Enter the name of the Topspeed file to be used. This must be a string constant (no variables allowed). Example: UserRules.TPS

User rules file password

If the User rules file is encrypted, enter a valid password here.

tplextensionglobalbusinessrules.htm.txt · Last modified: 2021/04/15 15:57 by 127.0.0.1