An attribute rule is a business rule of a [[Invantive Studio/Repository/Applications/Tables|table]]: a condition that the data must meet, or an action to perform on an event. The rules of a table are listed under the table as "Attribute Rules", in their sorting order. How rules are written and when they run is explained in [[Invantive Studio/Repository/Concepts/Attribute Rule|Attribute Rule]].
The attribute rules of the table of messages of Invantive Estate:
![[20261004-studio-attribute-rules.png]]
A rule with "Create" switched off is not generated; such a row documents a rule written by hand in the [[Invantive Studio/Repository/Concepts/Hook Package|hook package]] of the table.
## Fields
The details of an attribute rule show these fields:
- "Application Code": Unique alphanumeric code of the application.
- "Table Code": Unique alphanumeric code.
- "Code": Unique alphanumeric code.
- "Sort Order": Numeric value that determines the ordering of the records in this table in a drop-down box.
- "Event Category": When the rule applies: `I` insert, `U` update, `D` delete, `M` insert and update, `A` all events.
- "Action Category": What the rule does: `E` check a condition and raise an error, `A` perform an action.
- "Action Moment Category": For an action, when it runs: `B` before the row is written, `A` after.
- "Create": Whether the attribute rule will be created.
- "Constraint Specification": The condition, referring to the row as `:new`, `:old`, `:last` and `:event`.
- "Action Specification": The statement executed by an action.
- "User Message": The message shown when the condition is not met, written as a resource code.
- "Documentation": Documentation on the attribute rule.
- "Message Parameter 1": Expression for the first parameter of the user message.
- "Message Parameter 2": Expression for the second parameter of the user message.
- "Message Parameter 3": Expression for the third parameter of the user message.
- "Message Parameter 4": Expression for the fourth parameter of the user message.
- "Message Parameter 5": Expression for the fifth parameter of the user message.
## Tabs
The summary window of an attribute rule shows its related rows on these tabs:
- [[Invantive Studio/Repository/Applications/Tables|Table]]