App reviews, troubleshooting, and recommendations
I am not sure if this is obvious and I am just being stupid or what, but I just cannot add to a list of datetimes
Just gives me this:
Got error updating metafield: "Value is invalid JSON: unexpected token at '-03-05T11:40:16Z'." For value: "2024-03-05T11:40:16Z", Type: list.date_time
But works fine on a metafield where it is a single value. So what have I done wrong? I've tried looking at Flows filling list types and I can't see what I am doing differently.
No worries, this stuff can be tricky! It looks like the issue might be with how the list of datetimes is formatted. When you’re updating a metafield that expects a list, each item needs to be properly enclosed and separated.
For example, instead of just putting 2024-03-05T11:40:16Z, you need to format it as a JSON list. Here's a quick example of how it should look:
JSON - ["2024-03-05T11:40:16Z", "2024-03-06T12:45:30Z"]
Make sure each datetime is within quotes and separated by commas, and the whole list is enclosed in square brackets. This format should work for metafields expecting a list of datetime values.
Try updating the metafield with this format and see if it resolves the issue. If you’re still having trouble, double-check that the values you’re adding are correctly formatted and that there are no extra characters.
We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024