Which API are you using? It works fine for me using the REST API.
If you’re using the REST API, you need to use a colon (not a =>), like this:
"gains": "0.00072333333333363115"
Which API are you using? It works fine for me using the REST API.
If you’re using the REST API, you need to use a colon (not a =>), like this:
"gains": "0.00072333333333363115"
That actually depends on the programming language that is calling the REST API. For example, PHP uses =>
in arrays.
I think that the issues is more likely that the code has the invalid data type. If your number is in quotes, then Airtable thinks that you are providing a text string, not a number. Try removing the quotes from the number.
Instead of …
Try …
"gains" => 0.00072333333333363115,
That actually depends on the programming language that is calling the REST API. For example, PHP uses =>
in arrays.
I think that the issues is more likely that the code has the invalid data type. If your number is in quotes, then Airtable thinks that you are providing a text string, not a number. Try removing the quotes from the number.
Instead of …
Try …
"gains" => 0.00072333333333363115,
Ah, good to know! Thanks! Does PHP also use ‘=>’ for non-arrays, such as number/currency fields?
(I’m just using CURL, so I use : instead of =>)
Ah, good to know! Thanks! Does PHP also use ‘=>’ for non-arrays, such as number/currency fields?
(I’m just using CURL, so I use : instead of =>)
I’m referring to a PHP array, which is part of the PHP language, and is unrelated to Airtable field types.
I am using ruby. i actually dont have quotes around the decimal.
tea=Tea.create(“Symbol” => row[“instrument”], “Date” => row[“entryTime”] ,“TradePattern” => row[“tradepattern”] ,“tradeid” => row[“id”],“position” => row[“entryQty”],“gains” => row[“gains”],“isopen” => row[“isopen”],“account” => row[“account”], “airtable_lastsynctime”=>currenttime)
The data is retrieved from database as a decimal.
That actually depends on the programming language that is calling the REST API. For example, PHP uses =>
in arrays.
I think that the issues is more likely that the code has the invalid data type. If your number is in quotes, then Airtable thinks that you are providing a text string, not a number. Try removing the quotes from the number.
Instead of …
Try …
"gains" => 0.00072333333333363115,
I think the Suggestion by @kuovonne should be working.
It’s a problem with the data type of a particular field.
By default it’s automatically passed string, store it into a variable and make type conversion then put that variable in that proper place.