Skip to main content

I use a website that allows me to copy CSV text from a file and paste it into a hotspot on the webpage. Pasting it triggers a series of actions that updates records with the details of the pasted comma separated values.

I would love a component that would connect a CSV format to a model and allow for query/matching and  “On Paste” actions. That way I could paste in something like:

888-999039,99.65,Current,9/30/18

And it would query a specified field in the database for the first field “888-999039” and if found, bring that record into the associated model and update specified fields in that record with “99.65”, “Current”, and “9/30/18”. If it isn’t found, it would create a new record with the information from the imported CSV data.

I could then use the On Paste actions to display a table showing these records with unsaved changes that result from the pasted CSV info. I could choose to make additional edits, cancel the changes, or save the changes back to the database.

This same treatment could be applied to uploaded CSV instead of pasted. It would be a very streamlined import for those applications where you frequently import the same data. A single button on your page would allow you to select the file from your local computer to upload, pull out the data, query the database, pull the records into the model, update the records with the CSV data, create new records for those not found in the query and display a table with the unsaved changes. This would make basic imports EXTREMELY easy even for novice users which would greatly improve adoption and dramatically reduce the change of user error when importing.