#1
  1. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,465
    Rep Power
    594

    Creating global user variables for triggers


    I am trying to set up a number of triggers. They will all have one constant in common that I want to be able to change (a rare occurrence) in a single place rather than code it into each trigger and have to edit many triggers.

    It is not clear from the documentation how to create a global user variable. Can someone point me in the right direction? TIA.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.
  2. #2
  3. No Profile Picture
    Problem Solver
    Devshed Specialist (4000 - 4499 posts)

    Join Date
    Jan 2001
    Location
    Stockholm, Sweden
    Posts
    4,495
    Rep Power
    534
    User variables are session specific and not stored and are only intended to be used for temporary use.

    If you want to store the "constant" in a central place I suggest that you create a simple variables table eg something like (VariableName, Value) where you SELECT your "constant" from during the execution of the trigger.
    /Stefan
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Loyal (3000 - 3499 posts)

    Join Date
    Jul 2003
    Posts
    3,465
    Rep Power
    594
    Ah, I see, although the documentation seems to imply user global variables are possible.Thanks.
    There are 10 kinds of people in the world. Those that understand binary and those that don't.

IMN logo majestic logo threadwatch logo seochat tools logo