Enforcing all columns in imported file

QuestionsEnforcing all columns in imported file
Michael Murphy asked 3 years ago

When importing a csv file, if a column is missing from the imported file (e.g., the user accidentally deletes a column while editing in Excel, and then imports), the importer works without issue; for each row, it uses the values in the file for all other columns, and the missing column gets the default value for that column. If the user is replacing the existing data in the table, this could lead to a lot of accidental data loss.

Is there any way to prevent the import from working if the file is missing columns from the table?

1 Answers
Abu Ghufran Staff answered 3 years ago

Currently it’s not supported and we’ll be reviewing this case.

One solution is to check the columns count at the time of import using callback function, but it’ll show the validation message on 3rd step before the insertion in database. If you want to test this import callback validation, please email me at [email protected] and I’ll send you related demo files.

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Your Answer

17 + 2 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?