Data Table Import not working as expected
A data table is configured such that one of the keys is the Effective Date (property type is Date).
On entering the value for the EffectiveDate field in the Excel sheet in date format, the update is not performed.
Steps to Reproduce
- Create a data table with two keys. One of the keys must have a data type.
- Add some records.
- Import data through an Excel sheet
a. Add or Update.
b. Update if target is blank or if source is not blank.
The key column is selected as Date type. Hence, when importing a few CSV records, the results are incorrect.
For a BLOB, getExistingRecords is used to determine if each record of CSV is available in the database. In this case, the value in the database is saved in the yyyyMMdd format. Hence, in the getExistingRecords method, a check is performed to determine if the value is available with the CSV value (that is, with m/d/yyyy format) due to which the existing record returns false.
After updating the database, the value is converted to database format (that is, m/d/yyyy format is converted to the yyyymmdd format). The update does not occur when the type is 'Update if target is blank'.