Forum Academy Marketplace Showcase Pricing Features

Datetime array from API not saved in database

I’m trying to store data from an API call, it perfectly stores numbered and texts fields, but it does not save a datetime array I provide:

Test from Postman

Result in Bubble database

Set-up API WF (endpoint)

Set-up API WF (action)

Who can help me out?

Do you think it’s the quotation marks causing the problem?

How about if you try to save it as text first to see if it even loads ok.

Then if that’s the issue I would use text as an initial load field and create a secondary field that does a find replace on the quotation marks and then adds to the real data field of type date.

Thanks @john3 I’ve tried to load it as text, this works properly since the other parameters are stored as text/number as well. I will use this solution as temporary, but it is not preferred. Removing the quotation marks gives me the following error in Postman:

  "statusCode": 400,
  "body": "{\n    \"status\": \"INVALID_DATA\",\n    \"message\": \"Issue with data for workflow get_data: [02/13/2016, 02/13/2016, 02/13/2016] cannot be parsed as a JSON\"\n}"

Oh good - at least you know it works then!

To clarify - I wouldn’t remove the quotation marks before pulling it down to bubble.

Keep it that way and put it in a extra field in your database that’s designated for text. Then in your original date/time field do a search for that text field and strip out the quotation marks with a find replace and see if bubble will take the dates and store them in the correct format.

So in the end you’ll have 2 fields a temporary text field and the date/time field.

There may be a bug there, can you file a bug report?

will do