May 14, 2023 02:39 AM
Hi,
I'm trying to create a new table using CSV file with field name and data type only, without sample data using Airtable interface, not API.
For ex,
Field 1,Field 2,Field 3
text,number,date
The expected output is a table with three fields named “Field 1”, “Field 2”, and “Field 3”. The first field should be a text field, the second field should be a number field, and the third field should be a date field.
However, instead of setting the data type for each field, the second row was treated as a record.
I tried a different format and result is the same. Row 1 is treated as field names, and rest of the rows below were records:
Field Name,Data Type
Name,Single line text
Email,Email
Phone,Phone number
Address,Address
Date,Date
Status,Single select
Notes,Long text
Truly Appreciate any help you can provide.
Solved! Go to Solution.
May 14, 2023 04:54 AM - edited May 14, 2023 02:44 PM
> using Airtable interface, not API
That is not possible. You can only create field types through the API. What that means is that you will either need to use scripting or a low-code API tool like Make’s HTTP module.
May 14, 2023 02:47 PM - edited May 14, 2023 02:47 PM
@kuovonne Right, but you can’t specify field types via those other importing methods. Airtable will makes its own (poor) guess via the CSV import method, and it will copy/paste the field type in the copy/paste method. He wants to use text typed into another row to dictate the field type that should be set for the entire column… IN ADDITION to the problem you mentioned, which is that he doesn’t have any data. So there are 2 problems going on here.
May 14, 2023 04:54 AM - edited May 14, 2023 02:44 PM
> using Airtable interface, not API
That is not possible. You can only create field types through the API. What that means is that you will either need to use scripting or a low-code API tool like Make’s HTTP module.
May 14, 2023 02:17 PM
One reason this won't work is because Airtable needs sample data to infer the field type.
@ScottWorld It *is* possible to create fields via CSV import and by copy/pasting fields, not just via scripting or the web API. It just isn't possible to create fields with these methods without also having at least one record.
May 14, 2023 02:47 PM - edited May 14, 2023 02:47 PM
@kuovonne Right, but you can’t specify field types via those other importing methods. Airtable will makes its own (poor) guess via the CSV import method, and it will copy/paste the field type in the copy/paste method. He wants to use text typed into another row to dictate the field type that should be set for the entire column… IN ADDITION to the problem you mentioned, which is that he doesn’t have any data. So there are 2 problems going on here.