We have a custom action that sends some data to an external API, one of which is a number.
However, it seems that it’s possible for Adalo to send an incorrect value (blank) which is technically invalid json and therefore cannot be parsed at the other end.
Here is a summarised view of the the data that is sent…
Unfortunately for us this seems to happen intermittently and our best guess is that it originates from a Custom Formula which is proving difficult to diagnose. However, the fact that it’s even possible to send invalid JSON would seem to be an Adalo bug as I would expect it to at least send the default value or 0 and it should never send blank for a number data type.
It is possible it’s the hidden character formatting. If you look closely at what you pasted above, you’ll see two different types of quote marks.
You have “ as well as ".
This might seem strange, but some APIs won’t accept these stylized apostrophes. They are probably in your custom action due to copy and pasting. You can delete and retype them and they will be the correct (straight vertical) format.
I’d check this first, I’ve encountered issues with it before.
Thanks for the reply. The outer speech marks come from pushing this JSON log to Slack and then me copying and pasting it in so the only thing received by the API is the curly braces and inward. Therefore I don’t think this is the issue.
The issue I’m identifying is that
“current_task_sequence”: ,
is not valid JSON.
It should either be:
“current_task_sequence”: "" ← hoping Adalo wouldn’t do a string as it knows its a number
“current_task_sequence”: 0, ← Not ideal but reasonable
“current_task_sequence”: null, ← Probably the most accurate given a NaN situation
Sorry to clarify, the JSON here is not what we’re putting as the payload, this is the JSON received at the other end so they should be curly as this is the application/json payload.
The value of current_task_sequence is a custom formula (numeric) within a custom action set one property at a time. It’s the result of that custom formula which is somehow creating a blank - the reason for that is still unknown but the only point I was trying to make in this post is that no matter what this custom formula returns, Adalo should not be posting a blank value.