Hey there, Awesome Customers!

Just a heads up: We'll be taking a breather to celebrate International Workers' Day (May 1st and 2nd - Wednesday and Thursday) and Orthodox Easter from Good Friday (May 3rd) through Easter Monday (May 6th). So, from May 1st to May 6th, our team will be off enjoying some well-deserved downtime.

During this time, our customer support will be running on a smaller crew, but don't worry! We'll still be around to help with any urgent matters, though it might take us a bit longer than usual to get back to you.

We'll be back in action at full throttle on May 7th (Tuesday), ready to tackle your questions and requests with gusto!

In the meantime, you can explore our documentation for Amelia and wpDataTables. You'll find loads of helpful resources, including articles and handy video tutorials on YouTube (Amelia's YouTube Channel and wpDataTables' YouTube Channel). These gems might just have the answers you're looking for while we're kicking back.

Thanks a bunch for your understanding and support!

Catch you on the flip side!

Warm regards,

TMS

Okay
  Public Ticket #3625169
Editing Multiple User's Tables
Closed

Comments

  • Philip started the conversation

    Is it possible to use WPDataTables to keep a gradebook for users on our site?

    We'd like to have admins be able to edit the tables for each student but keep the student as view only.  How feasible would it be for the admin to go and edit each user's table data? 

    I followed the tutorial for setting up a manual table with user ID to keep data unique for each user.  Now I'm curious if it's really feasible to edit each table for each user from the backend.  What would be required to do that?

    Thanks


  •  1,692
    Miloš replied

    Hi Philip,

    I am not sure if I understood all the aspects of this Use-Case.

    For example, if you wish to have one "main/master" Table which is only for Admins to see all user's data and to be able to edit everything, while having an additional Table as 'view only' for the users on front-end, we will explain a workaround with two tables.


    You can achieve this with our premium plugin if you use SQL based tables.

    For example, you can have one main/master Manual table which will store all the data in the database.

    Then, you can check this table's MySQL Table name from the Editing tab in the back-end table settings,

    and you will be able to make multiple SQL tables that pulls data from the same "master table",

    and any editing you do on all these other SQL tables are going to be stored in the same table in the database,

    This will be my example table :

    3791094982.png

    Now, to make a new SQL Table from it,

    first, check in Editing Tab/MySQL table name for editing:

    6795720227.png

    in my example, the Manual table name is wp_wpdatatable_39,

    so i make a new SQL table that will pull data from it;

    and we can choose all columns like :

    SELECT * FROM Table_Name

    or just specific columns;

    we can also have completely different settings/filtering/sorting and limitations for front-end users on each table;

    and you can make multiple SQL Query tables that pull the same data from the "main table".

    SELECT  column_name1,
            column_name2,
            column_name3
    FROM table_name

    -

    In this example, if i want to limit to only show the "Company" column, and i will leave wdt_ID ( because we got to have row ID)  and userid ( if we want userID for limiting rows per currently logged user ID),

    when i hide those columns in the end, the front-end user will only see the "company" column.

    SELECT  wdt_ID,   
         userid,   
        company   
        FROM wp_wpdatatable_39
    4596672496.png

    Later, you can make another SQL Table that will show some other columns, have other filters and so on ( depending on what you need to achieve)...

    You can see my Video example here https://watch.screencastify.com/v/jOXrsJ9jaspWG5m3VqZH

    Let me know if that makes sense and if you have any questionssmile.png

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia 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

  •  1,692
    Miloš replied

    Hi Philip,

    My apology, I just forgot to add the last 'piece of the puzzle' since you also need each user to only see their own rows in the end, right?

    The 'core setup' with the main Manual Table for Admins, and another SQL Table for the front-end users will stay the same, we will just add that 'limit the rows for each user by user ID' solution in the end.

    So on the main Admin's Manual table, we will not set any 'restrictions';

    but for the additional SQL Query table, you can activate the feature 'Users see and edit only own data' under the Editing, but set the "Editor roles" to only Administrator Role.

    1498244162.png
    3407394845.png

    With a setup like this, the Admins will be able to edit the actual "userid" Column on their 'master Table' to set which user is going to see which rows by ID;

    and in the additional SQL Query table, you can set the Editor Role only for Admins - so it will become 'view only' for the front-end users.

    And of course, you will hide the 'user id' column from that SQL Table, so you can only show the columns they need to see, the rows they need to see, and there are many more possibilities to limit what they can see with filters and so on...


    Let me know if that achieves the use-case, when you combine the details from both replies?

    Thank you.

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia 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

  • Philip replied

    Thanks so much, Miloš! This is super helpful and should do what we need it to do. I think it will be a useful example for others with similar use cases. 

  •   Miloš replied privately