Suppose I have an entry that has a custom field named "Code", and another custom field named "Extended code" that has the value:
123{S:Code}456
Some day I decide to rename "Code" to "Short code", then it's reference on "Extended code" entry, will be broken.
So, my feature requests are:
1) I would like KeePass to update those references, taking advantage that custom fields can only be referenced from the same entry.
2) I know probably there is some manual workaround for achieving that, like search and replace.
If you consider that is enough, then, at least it would be nice if KeePass show me:
It would be also useful if when renaming, it detects that other entries have a custom field named "Code", and giving a list. Or even suggesting to rename any of them to "Short code" (my chosen name).
I know it can be technically challenging, but any improvement on this, would also improve quality of life when using KeePass
You can't obtain data from custom field in another entry, only within an entry. Your example will not work.
https://keepass.info/help/base/fieldrefs.html#syntax
If you change a field name then it is your responsibility to make sure references are also changed.
Assuming you use a reference in the form
{REF:U@O:Code}Use the Search box to find field references to the old field name. In your case you would search for
:codeKeePass does list field names that match when you rename a custom field.
cheers, Paul
Like I said:
"1) I would like KeePass to update those references, taking advantage that custom fields can only be referenced from the same entry."
I don't agree when you say "If you change a field name then it is your responsibility to make sure references are also changed.".
I'm a developer, and on any programming language, when you change a variable name, the IDE let you update all the references to that variable on a single click/code refactor feature.
It doesn't say "is your responsibility".
In my opinion, as IDEs want to improve developers QoL and productivity, also should KeePass.
Even more, you know the user intent without doubt. I mean: if the user changes a custom field name from "Code" to "Short code", you know that user also want references to stay working. So, updating those references is a need for the user.
Also, this can be critical for the user. Imagine the user change custom entry name, but didn't update the references because he/she forgot about it. Then he/she needs to get a value from a reference ASAP but it gives him/her an error. It becomes unusable until he/she corrects the error.
Even more, users could not know how to use the search & replace feature.
So I think we have a problem here, and KeePass should provide some help.
If my 1) feature proposal isn't implemented, I suggested at least one point of 2) to make user life easier and reduce posible errors.
At least, open search & replace dialog with preset values automatically just after renaming the custom field (if it detects there are broken references within the same entry).