#1713 Define user strings and assign values in triggers

Strings (1)

Would it be possible to define user strings and assign values in triggers? This would be useful for defining and managing PATHS to databases that are needed to open or synchronize databases, but that can't be expressed using built-in placeholders (e.g. the database isn't open yet). This feature would be especially useful to a user that wishes to increase the portability of a trigger set because one trigger could be used to manage all PATHS.

It is possible the the ability to assign string values could allow additional logic in triggers though I don't have anything in mind at the moment.

The ability to define and assign a string value in the keepass.config.xml file but outside of the trigger system would also meet the primary need, though it would be less convenient.


  • Paul

    Paul - 2013-03-15

    Can you create an entry called PATHS and use additional fields?

    cheers, Paul

  • wellread1

    wellread1 - 2013-03-15

    I can work around the current limitations by saving server names and PATHS in an always open database and use field references in the triggers. If the database got closed, the triggers would stop working.

    A few advantages of user defined strings in the trigger system are:

    1. The scope of the user defined strings would match the scope of the triggers.
    2. A set of triggers could be exported/imported as a self contained solution. Only a single trigger, that defined all the user PATHS, would require updating.
    3. It eliminates the possibility that a user will inadvertently break the triggers by deleting an entry that contains needed PATHs.
    Last edit: wellread1 2013-03-16
  • wellread1

    wellread1 - 2013-07-23

    Management of PATHs or other values that are used across multiple triggers, but that can not be expressed in terms of built in KeePass placeholders, can be accomplished with user defined environment variables. The SETX command allows convenient management of multiple permanent environment variables using a command file e.g.

    SETX KP_DATABASE_PATH "%USERPROFILE%\Documents\KeePass\dbname.kdbx"

    While not as convenient as storing the paths in the keepass.config.xml file, this a perfectly viable solution.

    This request can be closed.

    Last edit: wellread1 2013-07-24

Log in to post a comment.