How can I convert change a One value Metafield into a List of values metafield? Is that possible?
I already set a lot of metafields and I didn’t realize that I can’t select multiple values from a One value Metafield. I created it wrongly and I’d need a List of values one where it works. I tested it.
This is Kate from PageFly - Landing page builder, I’d like to suggest this idea:
It is not possible to convert a One value Metafield to a List of values Metafield on Shopify. You will need to create a new List of values Metafield and manually transfer the values from the old Metafield to the new one
If that is not working the rough programmatic process when objects cannot have their original access names(namespace or key) changed:
If the metafields, keys &names, are in already in use in production then you need a create, copy, backup, delete, create, copy process for metafield definitions(mfdef).
Create a placeholder mfdef of list type with a temp name
Copy the initial data from the existing in use metafield to the placeholder
Confirm the data is backedup and in this temp mfdef
Delete the in-use mfdef to free up the namespaces key
create the replacement mfdef of list type with the original name of the original mf-def
This way you do not need to modify any frontend usage of the metafields.
If you don’t know how to create a full app, there’s automation tools like usemechanic that can be scripted for such things.
It may now be theoretically possible to use shopify flow new data-list features do the copying operations of mfdefs, but not the creation or deletion at this time.
If you search the forums for change metafield namespace key, there are some apps-staff that outline how to user their apps for such things.