are there examples of how to add rows to a table. in particular i have been trying but failing multiple times, either using the adding rows function and uploading csv files to the table, which was originally created using the same method, uploading a csv file. further i have tried removing and adding columns and also import using phpadmin. can you assist? my table test for this adding of rows is a simple all varchar table column type. because there are new columns added by the plugin, all the wdt prefixed colulmns, how many columns should there be in the upload csv file? how is the wdt_ID column handled?
My sincere apologies for replying to your tickets so late, we will do our best to be much quicker going forward.
This depends on which option you choose when you update existing Manual (imported) Tables.
Please refer to this guide from the Documentation which shows important details about each option.
1. If i understood, you are trying to update an existing Manual Table by uploading your updated CSV file, right?
2. And you pick the option "Add rows to the current table data" ?
If you pick this option, you must not rearange any Column order from your source CSV, and you must not add/remove any Columns or change Header Names.
When you choose to only add new Rows -
When you click “Save Changes”, a popup window will be shown with an explanation of what will happen next, as you can see in the image below.
As you can see, with this option you’re about to add data from the source file to the existing manual table.
If you have any date-type columns in your file, please make sure that you match the date input format in the Main settings of the plugin to the one you’re using in your source file first.
If they are different, some data may not be added correctly.
Due to everything mentioned above, our advice is to duplicate your table first before updating, because there is no undo option.
Please note that for this option in the source file you will need to have:
The same number of columns
The same names of column headers
Data (empty file is not allowed)
So please do not rearange the Columns/rename the Headers, or add/remove Columns for that option.
You can see more details explained here how this Feature works :
3. If you have to rearange or add/remove/rename Header on some Columns on this Table data, and wish to upload an updated file, you can choose a different option :
Replace entire table with source.
With this option - you can do anything you wish with the Source data Structure, like re-order Columns/rename Headers, or add/remove columns and it will work.
Please note : When choosing that option, it will make all your columns as "String" type. So if you need to have any numeric Columns, it is best to just create a new imported Table, then you can tell the Manual table each Column type ( it tries to 'guess' each type by default, it will recognise if there are any numerical column types, but you have the ability to set them during table creation);
We still advise making a duplicate from the original Table, just to have a copy for safety.
Let me know if that helps.
2. When it comes to including our 'premade fields' such as wdt_ID and others, please remove them when you update the table. We will elaborate more on that part :
If you are updating an existing Manual Table and if you try to include any of these 'premade columns' of Manual tables like wdt_ID, or wdt_created_by, wdt_created_at, wdt_last_edited_by and wdt_last_edited_at;
in that case, it will fail to import.
So please check and ensure that you only use your custom Columns in the source Excel file which is used for importing of the 'replace rows with source data' and exclude any of these 'premade manual columns' because they will auto-populate with auto-assigned wdt_ID and auto-asigned data for the user who uploaded the file and the time, when it was uploaded, etc.
Let me know if that helped.
So to summarize, as you wrote, in regards to all the wdt prefixed colulmns, you can ignore these when you update the table;
It is just a question if you add/remove any Columns from the original Column structure of your custom columns.
1. If you only choose to add new rows, then skip all the wdt prefixed columns and just focus on your custom Columns - but make sure not to add/remove or rename any Columns, in this case it must remain as the same structure.
2. If you need to add/remove, or rename any Column headers, then you must choose the "Replace entire source" - but important to note, this makes all columns( if there were any numeric) to String type.
3. You can, of course, use PhPMyAdmin to build and import/update your SQL Table, but in this case, please don't use our Manual Table type - if you go to this method, then only use the SQL Query based Table to call the existing data.
If you use our Manual Tables, then you would have to use our built-in 'update Manual tables' feature, to maintain our Plugin's logic for Manual table type.
Let me know if that helps or if you encounter any further issues.
are there examples of how to add rows to a table. in particular i have been trying but failing multiple times, either using the adding rows function and uploading csv files to the table, which was originally created using the same method, uploading a csv file. further i have tried removing and adding columns and also import using phpadmin. can you assist? my table test for this adding of rows is a simple all varchar table column type. because there are new columns added by the plugin, all the wdt prefixed colulmns, how many columns should there be in the upload csv file? how is the wdt_ID column handled?
Hello Ed,
My sincere apologies for replying to your tickets so late, we will do our best to be much quicker going forward.
This depends on which option you choose when you update existing Manual (imported) Tables.
Please refer to this guide from the Documentation which shows important details about each option.
1. If i understood, you are trying to update an existing Manual Table by uploading your updated CSV file, right?
2. And you pick the option "Add rows to the current table data" ?
If you pick this option, you must not rearange any Column order from your source CSV, and you must not add/remove any Columns or change Header Names.
When you choose to only add new Rows -
When you click “Save Changes”, a popup window will be shown with an explanation of what will happen next, as you can see in the image below.
As you can see, with this option you’re about to add data from the source file to the existing manual table.
If you have any date-type columns in your file, please make sure that you match the date input format in the Main settings of the plugin to the one you’re using in your source file first.
If they are different, some data may not be added correctly.
Due to everything mentioned above, our advice is to duplicate your table first before updating, because there is no undo option.
Please note that for this option in the source file you will need to have:
So please do not rearange the Columns/rename the Headers, or add/remove Columns for that option.
You can see more details explained here how this Feature works :
https://wpdatatables.com/documentation/table-features/update-manual-tables-from-source-files-csv-excel-or-google-sheet/.
3. If you have to rearange or add/remove/rename Header on some Columns on this Table data, and wish to upload an updated file, you can choose a different option :
Replace entire table with source.
With this option - you can do anything you wish with the Source data Structure, like re-order Columns/rename Headers, or add/remove columns and it will work.
Please note : When choosing that option, it will make all your columns as "String" type. So if you need to have any numeric Columns, it is best to just create a new imported Table, then you can tell the Manual table each Column type ( it tries to 'guess' each type by default, it will recognise if there are any numerical column types, but you have the ability to set them during table creation);
We still advise making a duplicate from the original Table, just to have a copy for safety.
Let me know if that helps.
2. When it comes to including our 'premade fields' such as wdt_ID and others, please remove them when you update the table. We will elaborate more on that part :
If you are updating an existing Manual Table and if you try to include any of these 'premade columns' of Manual tables like wdt_ID, or wdt_created_by, wdt_created_at, wdt_last_edited_by and wdt_last_edited_at;
in that case, it will fail to import.
So please check and ensure that you only use your custom Columns in the source Excel file which is used for importing of the 'replace rows with source data' and exclude any of these 'premade manual columns' because they will auto-populate with auto-assigned wdt_ID and auto-asigned data for the user who uploaded the file and the time, when it was uploaded, etc.
Let me know if that helped.
So to summarize, as you wrote, in regards to all the wdt prefixed colulmns, you can ignore these when you update the table;
It is just a question if you add/remove any Columns from the original Column structure of your custom columns.
1. If you only choose to add new rows, then skip all the wdt prefixed columns and just focus on your custom Columns - but make sure not to add/remove or rename any Columns, in this case it must remain as the same structure.
2. If you need to add/remove, or rename any Column headers, then you must choose the "Replace entire source" - but important to note, this makes all columns( if there were any numeric) to String type.
3. You can, of course, use PhPMyAdmin to build and import/update your SQL Table, but in this case, please don't use our Manual Table type - if you go to this method, then only use the SQL Query based Table to call the existing data.
If you use our Manual Tables, then you would have to use our built-in 'update Manual tables' feature, to maintain our Plugin's logic for Manual table type.
Let me know if that helps or if you encounter any further issues.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
Try our FREE mapping plugin! MapSVG - easy Google maps, interactive SVG maps and floor plans, choropleth maps and much more - https://wordpress.org/plugins/mapsvg-lite-interactive-vector-maps/
wpDataTables: FAQ | Facebook | Twitter | Instagram | Front-end and back-end demo | Docs
Amelia: FAQ | Facebook | Twitter | Instagram | Amelia demo sites | Docs | Discord Community
You can try wpDataTables add-ons before purchasing on these sandbox sites:
Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables