import CSV provide a blank choice for the field match
import CSV provide a blank choice for the field match
I am working through the import process for my table using the example here:
https://editor.datatables.net/examples/extensions/import.html
I have this up and working as is, but am looking to add a blank selection to the select dropdowns that are used to match the import fields.
The goal is that if the user is bringing a doc in that has extra fields or no data for some of the fields of the table, they can select the blank choice and on import the field would just remain empty for each record imported.
Bonus points to be able to auto-match fields if there is an option that matches perfectly...any ideas for either?
This question has an accepted answers - jump to answer
Answers
This thread might help you get started.
Kevin
Thanks Kevin! That did the trick, I had searched a couple of times and never came across that.
Now onto trying to see if i can auto select if names match.
Thanks again!
I knew that thread was there and it took a few tries for me to find
Please post your solution for this. Sounds like a good idea.
Kevin
This is what I do to map csv fields to the editor fields. Also provide a means to default to blank if no match found. The match is case insensitive by way of toLowerCase function. Perhaps someone will have a more efficient approach. In the meantime, hope this helps.
Hi KhanBoupha,
I'm giving a modifed verison of this a try and it seems to be working, but when I leave a field set to the added 'none', it enters data of a number, in my case 3, which I'm guessing is the value of the multiset/none choice.Are you seeing that same behavior or do you have a solution for this?