I have one table for all my users and they can only see their own data...I have two questions please:
1) Is there a shortcode whereby my sales manager can see a master table of all the users data on a private webpage, or a way I can show a master table on a web page?
2) My table looks great but I need to add a user name field that the users do not see but the admin can see the names of users in the master view.
1. Sure, your administrators can see all data in back-end, if they enable "Show all rows in back-end" in the Edit tab above the table. Another way would be to copy the MySQL table name for editing (again from the Edit tab above the table), and use it to create an SQL query based table with:
SELECT * FROM wp_wpdatatable_XX
Then, you would pull all the data from the original table into that SQL query based table, and post it on front-end on a private page.
2. If the user name would be populated automatically, you can add the predefined editing value (in column settings/editing) %CURRENT_USER_LOGIN% and that would pick up his username. The thing with this is that they would be able to change it, so you would need to hide the column from front-end from column settings, but to hide it from the new-entry modal, you would need to use some custom CSS. I can help you with that if you can point me to the page where the editable table is located.
Thanks Aleksandar Replying to items 1 &2... 1) I had mad a copy of the original table where users could only see and manage their own data and the new table set to see all and that seemed to work fine for my Salesman to see all the users entered data. Will that work? it seems to. 2) You had given me code to show the user's username but I was actually hoping for the users name (first and last names). Thanks! Mark
1) I have 2 Manual tables sharing the same db. One is a master of all the users and the other is set edit onw data only. Can you tell me why when the one set to edit own data only does not show the data they entered. It is appearing on the Master table but not on the one set to show/edit own data only. 2) My date column with %CURRENT_DATE% placeholder shows a date picker instead of just showing the current date and the date format is d/m/y and I would hope to have it as d/m/y.
As for #2 - I already responded about this in your other ticket.
1) I don't quite understand the question. The table where you enabled "Users see and edit only own data" don't show the newly entered data to users?
If that's true, please tell me which column did you choose to be the User ID column? If you set it to be wdt_ID - you can't use that because that's an auto-increment column. You need to use a regular integer column.
Hello,
I have one table for all my users and they can only see their own data...I have two questions please:
1) Is there a shortcode whereby my sales manager can see a master table of all the users data on a private webpage, or a way I can show a master table on a web page?
2) My table looks great but I need to add a user name field that the users do not see but the admin can see the names of users in the master view.
Thanks so much! Mark
Hello Mark
1. Sure, your administrators can see all data in back-end, if they enable "Show all rows in back-end" in the Edit tab above the table. Another way would be to copy the MySQL table name for editing (again from the Edit tab above the table), and use it to create an SQL query based table with:
SELECT * FROM wp_wpdatatable_XX
Then, you would pull all the data from the original table into that SQL query based table, and post it on front-end on a private page.
2. If the user name would be populated automatically, you can add the predefined editing value (in column settings/editing) %CURRENT_USER_LOGIN% and that would pick up his username. The thing with this is that they would be able to change it, so you would need to hide the column from front-end from column settings, but to hide it from the new-entry modal, you would need to use some custom CSS. I can help you with that if you can point me to the page where the editable table is located.
Kind Regards,
Aleksandar Vuković
[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
Thanks Aleksandar,
Thanks Aleksandar
Replying to items 1 &2...
1) I had mad a copy of the original table where users could only see and manage their own data and the new table set to see all and that seemed to work fine for my Salesman to see all the users entered data. Will that work? it seems to.
2) You had given me code to show the user's username but I was actually hoping for the users name (first and last names).
Thanks!
Mark
You're welcome, Mark
1. That should work, yeah.
2. Full name can't be displayed that easily since it is split into two. You can use %CURRENT_USER_FIRST_NAME% and/or %CURRENT_USER_LAST_NAME%.
Kind Regards,
Aleksandar Vuković
[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
That works great; thank you!
Could you please also tell me the code for "today's date"?
Thanks,
Mark
You can see the list of all placeholders in the "Placeholders" tab above the table (see attachment).
What you need is %CURRENT_DATE%
Kind Regards,
Aleksandar Vuković
[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
Your last was very helpful :)
1) I have 2 Manual tables sharing the same db. One is a master of all the users and the other is set edit onw data only. Can you tell me why when the one set to edit own data only does not show the data they entered. It is appearing on the Master table but not on the one set to show/edit own data only.
2) My date column with %CURRENT_DATE% placeholder shows a date picker instead of just showing the current date and the date format is d/m/y and I would hope to have it as d/m/y.
Thanks so very much!
Hi again Mark
As for #2 - I already responded about this in your other ticket.
1) I don't quite understand the question. The table where you enabled "Users see and edit only own data" don't show the newly entered data to users?
If that's true, please tell me which column did you choose to be the User ID column? If you set it to be wdt_ID - you can't use that because that's an auto-increment column. You need to use a regular integer column.
Kind Regards,
Aleksandar Vuković
[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