Topic
1 reply Latest Post - ‏2013-07-08T19:17:47Z by llandale
octavianstanescu
octavianstanescu
5 Posts
ACCEPTED ANSWER

Pinned topic For trigger in database

‏2013-07-04T00:42:08Z |

Hi,

Executing:

Tigger t

for t in database do print name t "\n"

Returns:

dynamic 0

dynamic 1.

Also print dxl t, returns emtpy.

Why are those dynamic triggers at database level and what do they do?

-Octavian

 

  • llandale
    llandale
    2943 Posts
    ACCEPTED ANSWER

    Re: For trigger in database

    ‏2013-07-08T19:17:47Z  in response to octavianstanescu

    I investigated these some time ago, IIRC they are the "drag and drop" triggers used to implement those features; something to do with "Discusions".  In any event they were benign and needed to be left alone.

    There are some "kind"s of triggers.

    • Stored triggers are stored in the Module/Project/Database and exists for everybody when these things are "loaded".
    • Dynamic triggers are temporary.  In this case one of the native startup include files "deploys" these "dynamic" triggers in YOUR database instance; they are not actually saved in the database.  Typical "dynamic" triggers are stored while you have the module open but are not stored in the database.
    • BuiltIn triggers are controlled by the system, and seem to exist for the purpose of actually invoking a user Dynamic or Stored trigger.  I have never seen a case where I did not want to ignore them.

    You cannot retrieve the DXL code behind dynamic nor builtin triggers.  Rats.

    When dealing with triggers, consider the following:

    • string TrigKind = kind(trg)
    • if (TrigKind == "builtin")  then continue // ignore "BuiltIn" triggers
    • if (TrigKind == "dynamic") then continue // ignore "Dynamic" triggers

    -Louie