Cannot select 'List of Values' on a Metafield without a definition

I’m not sure if this a lack of a feature or a bug:

If I have an non-defined metafield, and I go to ‘Add a definition’, it doesn’t not allow me to select ‘List of Values’, even if all of the data in that metafield seems to be properly formatted.

Once you create the definition, then the ‘One Value’/‘List of Values’ selector is permanently set to ‘One Value’.

The only workaround I know is manually creating the definition first before any metafield data exists. If any data exists, it wont let you create the definition because it will say the key already exists.

If the definition is created first, then when I add the metafield data via API, then it works. Which is an awkward process at best.

This is the format of the metafield data I am creating:

{ “namespace”: “foo”, “key”: “bar”, “value”: “["my", "json", "array"]”, “value_type”: “json_string” }

3 Likes