How to format the additional_info field for a Metadata "selection"

I’d like to add a selection (choice) metadata field to a workspace. According to the docs, the format of the additional_info field should be like:

Selection: A select box with a set of value that you can define using the “Additional Info” field, using the following syntax: key1|Label 1,key2|Label 2,key3|Label 3

However, this does not work for me. The selection dropdown is always empty, regardless of how I format this field.

are you talking about this feature ?


Yes. How should I format the selection options in additional_info field?

Either the docs are incorrect, or there’s a bug with displaying the selection options.

I added the Selection metadata field, and added selection options to the additional_info field (following the docs), but the selection drop-down on the main page is empty.

yes it should be key|label.
I will ask the devs about it.

Could you look at this picture and tell me if your settings looks like those.

Thank you for confirming, this helped me find the bug.

When I create a meta data field id with an underscore, this feature breaks.

e.g., this does not work:

Also, using an underscore in the field ID breaks the ability to search. It seems the “_” is being incorrectly translated to “-” when written into the .ajxp_meta file.

Here are my steps to reproduce this bug:

Create a new file system based workspace, add Text Metadata feature, add a new field (selection type), set the field ID to be “does_not_work”, set Additional Info to “key1|Label 1,key2|Label 2,key3|Label 3”. Then navigate to the workspace, upload a file, edit the metadata, and the selection dropdown will be empty.