If the CSV Import data action fails, the following tips may help you resolve the problem.
EnumList field import fails with "failed Valid_If condition"
You may see this error if you import a CSV file containing an
EnumList field. The problem occurs when the
EnumList field specifies a
Valid_If expression containing a list of valid values. If you attempt to store a record containing two or more values in the
EnumList field, the
Valid_If condition will fail. This is the result of a long standing shortcoming in the server expression system. CSV Import will fail with the message:
"Error: Row having key '<key value>' in table '<table Name>' containing value '<enumList field value>' failed Valid_If condition"
For example, the
EnumList field might specify the
LIST("A", "B", "C", "D")
The system automatically converts this
Valid_If expression into the following equivalent
Valid_If expression. Note that
[_THIS] refers to the value of the current field. In this case, the
IN([_THIS], LIST("A", "B", "C", "D")
When the server expression system evaluates the
IN expression, it fails to detect that the
EnumList field may contain a list of values. It mistakenly treats the value in the
EnumList as a single value which it compares to each value in the
LIST. For example, if the
EnumList field contains "A , C", it compares "A , C" to the
LIST values "A", then "B", then "C", and finally "D". The EnumList value "A , C" does not match any of these values, therefore the
Valid_If condition fails.
Note: We are investigating how to fix this shortcoming in the server expression system. This is more difficult than it seems because we need to fix the problem without breaking customers who may be advertently or inadvertently relying on the current behavior.
We are not aware of any way to avoid this problem other than removing the
Valid_If expression for the
The expression is valid but its result type '<type>' is not one of the expected types: Text
This error message displays when the expression specified in the CSV file locale property of the Import action does not yield a text value. Update the expression to return a valid locale identifier.
Importing records to table: TestCsvImport failed because CSV file locale is missing.
This error message displays when the expression specified in the CSV file locale property of the Import action yields an empty string rather than a valid locale identifier. Update the expression to return a valid locale identifier.
Import CSV Failed. CSV file locale 'en-XX' is invalid.
This error message displays when the expression specified in the CSV file locale property of the Import action yields an invalid locale identifier. Update the expression to return a valid locale identifier.
Row key field '<field Name>' value is missing.
If the CSV file header does not contain the table's key column name, or if the CSV file header does not exactly match the table's key column name, you may see an error such as the following:
Row key field 'Name' value is missing.
This happens when the table's key column name cannot be found in the CSV file header.
In the example above, the table's key column name was
Name but the CSV file header contained
name which was not capitalized.
Field '<field Name>' cannot be converted to type '<type>' using locale '<locale name>'.
If the wrong locale is specified for the CSV Import data action, you may see an error such as the following:
Error: Row having key 'Bob' in table 'TestCsvImport' containing value '25/12/2021' in field 'OrderDate' cannot be converted to type 'Date' using locale 'English (United States)'.
This happens because the CSV file locale you specify for the Import data action determines how field values in the CSV file which are locale sensitive are parsed. For a list of locale sensitive data types see Locale and Data Format.
In the example above, the date field
OrderDate in the CSV file contained a date value in
English (United Kingdom)
dd/MM/YYYY format. The Import data action specified a CSV file locale of
English (United States) so all dates are expected to be in
M/d/yyyy format. The error occurred because
25 is not a valid month value.
Only one CSV header column was found
If the wrong locale is specified for the CSV Import data action, you may see the error:
Failed to get rows due to: Only one CSV header column was found. It has the value 'Name,Date,DateTime,Decimal,Price,Count'. It is possible that the wrong Locale was specified and hence the wrong column delimiter ';' was used. If you are attempting to Import CSV data, please verify that the proper 'CSV file locale' is being specified in the Import data action.
This happens because the locale you specify for the Import data action determines which CSV delimiter is used to parse the CSV header row. For example, if you specify locale
de-DE then the expected CSV delimiter is semicolon. If the CSV header row delimiter is actually comma, then the CSV header row will not be parsed correctly and this error will result.
Timeout occurred or import is taking too long
If your CSV file contains a large number of rows or columns, CSV Import may exceed the 4-minute time limit. The complexity of your app formulas and the number and complexity of your automation processes can also have a large effect on the CSV Import time. See Choose a CSV file size for more details.
You can use the Performance Analyzer to better understand CSV Import performance. In the Editor go to Manage > Monitor > Performance Profile and click Launch performance analyzer to launch the performance analyzer.
Find and expand the ImportCSV record to see where the time is going.
- If your table includes Virtual Fields, check the time required to compute the app formulas for those fields.
- If you have automation processes that are triggered by the CSV Import, check the time required to process them.