Troubleshooting of Airtable API: Difference between revisions
| Line 28: | Line 28: | ||
* Menu: Edit field | * Menu: Edit field | ||
* Choose the proper data type e.g. switch from "short line text" to "number" | * Choose the proper data type e.g. switch from "short line text" to "number" | ||
* {{exclaim}} If the data type of the field is a number and null values are allowed, you need to convert empty strings {{kbd|key=<nowiki>""</nowiki>}} to {{kbd|key=<nowiki>NULL</nowiki>}} before writing to Airtable. | |||
Example data: Input data of different data types, whether writing to Airtable is successful or the error message received. | |||
<table class="wikitable sortable" style="margin:auto" border="1"> | |||
<tr><th title="Field #1">Field value</th> | |||
<th title="Field #2">Instruction of field value</th> | |||
<th title="Field #3">Single line text</th> | |||
<th title="Field #4">Long text</th> | |||
<th title="Field #5">Number (Decimal 1,0)</th> | |||
<th title="Field #6">Number (Integer 2)</th> | |||
</tr> | |||
<tr> | |||
<td>{{kbd|key=<nowiki>""</nowiki>}}</td> | |||
<td>Empty string</td> | |||
<td>ok</td> | |||
<td>ok</td> | |||
<td>INVALID_VALUE_FOR_COLUMN</td> | |||
<td>INVALID_VALUE_FOR_COLUMN</td> | |||
</tr> | |||
<tr> | |||
<td>{{kbd|key=<nowiki>"0"</nowiki>}} or {{kbd|key=<nowiki>'0'</nowiki>}}</td> | |||
<td>Quoted number</td> | |||
<td>ok</td> | |||
<td>ok</td> | |||
<td>INVALID_VALUE_FOR_COLUMN</td> | |||
<td>INVALID_VALUE_FOR_COLUMN</td> | |||
</tr> | |||
<tr> | |||
<td>{{kbd|key=<nowiki>0</nowiki>}}</td> | |||
<td>Number without double quote</td> | |||
<td>INVALID_VALUE_FOR_COLUMN</td> | |||
<td>INVALID_VALUE_FOR_COLUMN</td> | |||
<td>ok</td> | |||
<td>ok</td> | |||
</tr> | |||
<tr> | |||
<td>{{kbd|key=<nowiki>456</nowiki>}}</td> | |||
<td>Integer</td> | |||
<td>INVALID_VALUE_FOR_COLUMN</td> | |||
<td>INVALID_VALUE_FOR_COLUMN</td> | |||
<td>ok</td> | |||
<td>ok</td> | |||
</tr> | |||
<tr> | |||
<td>{{kbd|key=<nowiki>78.9</nowiki>}}</td> | |||
<td>Number with decimal point</td> | |||
<td>INVALID_VALUE_FOR_COLUMN</td> | |||
<td>INVALID_VALUE_FOR_COLUMN</td> | |||
<td>ok</td> | |||
<td>ok</td> | |||
</tr> | |||
<tr> | |||
<td>{{kbd|key=<nowiki>NULL</nowiki>}}</td> | |||
<td>NULL value</td> | |||
<td>ok</td> | |||
<td>ok</td> | |||
<td>ok</td> | |||
<td> </td> | |||
</tr> | |||
</table> | |||
== How to fix UNKNOWN_FIELD_NAME == | == How to fix UNKNOWN_FIELD_NAME == | ||