2 followers Follow

Change list of values in enumerated Field


I'm using DocumentField.createEnumeratedField for some document fields in my plugin. This is working fine, but now I want to change the allowed values for that field, and I can't get that to work.

I create the field on startup of Geneious and I can see that the new values are correctly displayed when calling getEnumerationValues(). But they are not shown in the combo box of the GUI. The same happens when I try to get the DocumentField specifically from one document (via getDisplayableFields()), then call setEnumerationValues() on the field and saveDocument on the document.

How do I update the possible values on an enumerated field for all existing documents?

Thanks in advance,


Anne Mund

Official comment


Hi Anne,

Sorry, but unfortunately you can't update the enumeration values on existing documents. The best I can suggest is to change the code of your field so that newly generated documents will have the correct values. If you change just the code of your field it can still have the original field name. You could also write code to find all of the old documents in your database, delete the old field and add the new field to them.

Mike Chen
Comment actions Permalink

Please sign in to leave a comment.



Hi Matt,

Thanks for the quick answer!

This is unfortunate; I'll see if I can implement the workaround you suggested.

Anne Mund 0 votes
Comment actions Permalink