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.
Find Global Growth Opportunities For Your Business with Shopify AcademyLearn how to exp...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025Expand into selling wholesale with Shopify Academy’s learning path, B2B on Shopify: Lau...
By Shopify Jan 28, 2025