You generally can’t set metafields to an empty value.
Topic summary
A user is building a Shopify Flow to automatically populate product color metadata based on tags like “primary-black”. The workflow triggers when a product is added and should extract the color from the tag to update a metaobject.
Current Issue:
- Flow returns error: “Value can’t be blank” when attempting to update the metafield
- The user modified code from an attached video tutorial (starting at 6:45) but lacks coding experience
- Created a color metaobject that includes title, hexcode, and jpg fields
Technical Details:
- User’s current code attempts to assign color metadata by replacing “-primary” from product tags
- Question raised: Should each detail from the metaobject (color name, hexcode, jpg presence) be added individually?
Response:
- Another user notes that metafields generally cannot be set to empty values, suggesting the blank value issue is the root cause
Status: Unresolved; troubleshooting the empty value error and proper metaobject reference structure