If you create a table manually our plugin will create auto increment column with row IDs. It is hidden by default but you can set it to visible if needed
i am not talking about create table manually, let me put in this way if i want to show wp_posts table and show serial number with each row then what i need to do ?
I'm not sure if it is possible, but I'd like to create Column 1 that has Serial IDs (goes up by 1 each new entry), and Column 2 has Country Name. Then, in my main table I'd like to use the Country table as a foreign key where it selects the Serial_ID but SHOWS the Country Name in the main table.
The purpose would be so that if I want to change the spelling or the like of a Country Name, it does not create an error within the main table as the Serial_ID is referenced and not the text.
This would also apply to boolean reference tables. Ie. 2 entries in the table. Col 1 has entries 0 and 1; Col 2 has text reference for what those 2 options correspond to. And then you could choose the text option in a main table but it would enter the boolean integer in the actual database.
Does the WPDT foreign key use the integer of the automatically created wpdt row ID as the reference? (I think that is what is happening in the tutorial.)
If that is the case, could I use that to achieve my serial id goal with the countries linked table? (As in, when I link the foreign key table, even though I select a country name, the table row number is what is entered into the main table?)
is it possible we will create an auto increment field in wp data table ?
if yes then please let me know how
thanks
Hi usman,
Thank you for you inquire.
If you create a table manually our plugin will create auto increment column with row IDs. It is hidden by default but you can set it to visible if needed
i am not talking about create table manually, let me put in this way if i want to show wp_posts table and show serial number with each row then what i need to do ?
Hi usman,
Please tell me do you need to save that number or just to show it on frontend like rank column?
I'm with usman on this ... I'd like to created a Serial_ID for each row so that it may be the number referenced in a separate table using the following (https://wpdatatables.com/documentation/front-end-editing/configuring-table-relations-foreign-key/).
I'm not sure if it is possible, but I'd like to create Column 1 that has Serial IDs (goes up by 1 each new entry), and Column 2 has Country Name. Then, in my main table I'd like to use the Country table as a foreign key where it selects the Serial_ID but SHOWS the Country Name in the main table.
The purpose would be so that if I want to change the spelling or the like of a Country Name, it does not create an error within the main table as the Serial_ID is referenced and not the text.
Is this possible?
This would also apply to boolean reference tables. Ie. 2 entries in the table. Col 1 has entries 0 and 1; Col 2 has text reference for what those 2 options correspond to. And then you could choose the text option in a main table but it would enter the boolean integer in the actual database.
Is this possible?
HI CopyrightSlap,
Sorry to disappoint you but unfortunately use case like yours can not be achieved with the plugin built in features at the moment.
Best regards.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
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
Does the WPDT foreign key use the integer of the automatically created wpdt row ID as the reference? (I think that is what is happening in the tutorial.)
If that is the case, could I use that to achieve my serial id goal with the countries linked table? (As in, when I link the foreign key table, even though I select a country name, the table row number is what is entered into the main table?)
HI CopyrightSlap,
May I kindly suggest you to open a new ticket about this question where you will be the owner of the ticket.
Our college which is not at the office is assigned for this ticket so it is very difficult to follow this conversation here.
Best regards.
Kind Regards,
Miloš Jovanović
[email protected]
Rate my support
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