Using the SET action command to insert data
You can use the SET action command in a rule set to 'insert' data, or force certain fields to take specific values whilst data is entered.
For example, during Ledger Entry (LEN) you could SET a particular ledger analysis code to a specific value, or in Chart of Accounts (COA) you could SET the short heading to take the same value as that entered for the account code. These separate examples are as shown in the following table:
Command | Value 1 | Operator | Value 2 | Result |
SET | Ledger Analysis 1 | = | N1C0 | Regardless of what the operator enters in Ledger Analysis 1, the code N1C0 will be inserted. |
SET | Short Heading | = | Account Code | Regardless of what the operator enters in the Short Heading field, it will be given the same value as the Account Code. |
Which fields can be inserted with the SET action command?
When defining a rule set to insert data with the SET action command, most of the fields that can be checked by a business rule can also be inserted or changed by the business rule. However, certain data items in each function cannot be changed or inserted with the SET command.
Fields that are unique keys to a record must be created during data entry. Such fields cannot be set by a business rule, even though they can be checked for validity by the business rule. A few examples of such unique key fields in static data maintenance are: Account Code, Asset Code, Asset Subcode, Bank Code, and Bank Subcode; all of which must be created by the operator during data entry. In another example, Ledger Entry, the Journal Number cannot be set by a business rule, because it is a unique numeric key to the journal created by SunSystems during posting.