Menu

Property - Override URL on Groups

Help
2017-12-07
2019-01-12
  • David Meier

    David Meier - 2017-12-07

    Is there any way to set the property 'Override URL' on the group level?
    Or - at least - to assing this property for all entries in a group using some kind of 'mass update'?

    If not yet possible, any plans to add this property on group level?

    regards
    david

     
  • Paul

    Paul - 2017-12-08

    Not for a group.
    You could create a global over-ride, then use that prefix in the URL of entries in the group.
    Tools > Options > Integration > URL Overrides.

    cheers, Paul

     
  • David Meier

    David Meier - 2017-12-08

    Thanks for your answert. That's not what i would need, since i still would have to modify all entries in the group to use this override.
    i'm looking for a solution where i could do this with only one modifictation. That's why i ask for something on the group level.
    regards
    david

     
  • wellread1

    wellread1 - 2017-12-08

    You can use XML Replace to update all URL Overrides in a group. Selece Tools>Database Tools>XML Replace... from the KeePass menu.

    IMPORTANT Backup your database before making major changes.

    The following XML Replace example (offered without warranty) will replace the URL override with cmd://{INTERNETEXPLORER} "{URL}" in every entry contained in all groups named test:

    Select nodes: //Group[Name='test']/Entry/OverrideURL
    Action: Replace Data
    Data: Inner text
    Find what: ^.*$
    Replace with: cmd://{INTERNETEXPLORER} "{URL}"
    Regular Expressions: Activated
     

    Last edit: wellread1 2017-12-08
  • Luigi Kang

    Luigi Kang - 2019-01-10

    Hi, since a group can have subgroups, I'm curious about what to do with selecting groups.
    Continuing from the above example, if the group structure is like this:
    parent1
    --test
    --someOtherTestGroup1
    parent2
    --test
    --someOtherTestGroup2

    Will the above code replace nodes under test of both parent1 and parent2?

    How can one select nodes to replace all groups under parent1?

     
  • Paul

    Paul - 2019-01-10

    As long as the group name only matches "parent1" then it will only change parent1 and sub groups.
    The group selection is off the root, hence the double backslash. If you want to be more specific you can add sub group identifiers: //Group[Name='test']/Group[Name='sub-test']/Entry/OverrideURL

    cheers, Paul

     

    Last edit: Paul 2019-01-10
  • Luigi Kang

    Luigi Kang - 2019-01-11

    Hi, thank you for pointing out how to change nodes under specific subgroups. For nodes under root\test\sub-test //Group[Name='test']/Group[Name='sub-test']/Entry/... does change the nodes, however, as I just tested out, //Group[Name='test']/Entry/... does not (the latter only changes nodes under root\test).

     
  • Paul

    Paul - 2019-01-11

    Probably need to use a wildcard for the sub-group, but this won't work at multiple levels.
    //Group[Name='test']/Group[Name='.*']/Entry/OverrideURL
    I suspect KPScript does the same, but you could test it anyway.

    cheers, Paul

     
  • Luigi Kang

    Luigi Kang - 2019-01-11

    After some testing, given a structure of
    root
    -parent1
    --test
    --someOtherTestGroup1
    ---level3
    -parent2
    --test
    --someOtherTestGroup

    Using, XML Replace, to match entries under children of 'parent1', aka 'test' and 'someOtherTestGroup1', and not grandchildren, aka 'level3':
    //Group[Name='parent1']/*/Entry/...

    To match entries under children of 'parent1', and their descendents, including 'level3':
    //Group[Name='parent1']//*/Entry/...

    To match entries under children of 'parent1', and their descendents, including 'level3', including entries under 'parent1':
    //Group[Name='parent1']/descendant-or-self::Entry/...

     
  • Paul

    Paul - 2019-01-12

    Thanks for working that out.

    cheers, Paul

     

Log in to post a comment.