ITableTriggers.FindByKey

Syntax

FindByKey(Key: Integer): ITableTrigger;

Parameters

Key is trigger key.

Description

The FindByKey method searches and returns the object containing a trigger of the table. The key, by which search is performed, is passed by the Key parameter.

Example

Sub Main;

Var

MB: IMetabase;

Table: ITable;

Triggers: ITableTriggers;

Trigger: ITableTrigger;

s: String;

Begin

MB:=MetabaseClass.Active;

Table:=MB.ItemById("TABLE_1").Bind As ITable;

Triggers:=Table.Triggers;

Trigger:=Triggers.FindByKey(1);

s:=Trigger.Id;

End Sub Main;

After executing the example, the "s" variable contains the identifier of trigger, key of which equals 1. The table identifier is Table_1.

See also:

ITableTriggers