Okay
  Public Ticket #3378887
"Bookmark" column
Closed

Comments

  •  5
    Clément started the conversation

    Hi, 

    I've read in your documentation that it is possible to allow users to see and edit their own data. Would it then be possible to have the same table for everyone, but each user could bookmark the lines they want?

    It would basically be a column with 0 and 1, but unique to each individual.  

    Regards, 

    Clément. 

  •  1,819
    Miloš replied



    Hi, Clément.

    Firstly, I would like to sincerely apologize for the delayed response as we have been experiencing an unusually high number of tickets. I am sorry that it has taken longer than usual to respond to your concern and your patience is highly appreciated.

    -

    Yes, if you use our feature to limit the rows in the table, so that when a user adds a new row,

    it would auto-populate this row with their user ID,  and after only this user can see his own rows, other users can not see other people's rows.

    -

    If i understood your desired use-case, it would be the same rows showing for everyone,

    but each user could "bookmark" or choose  0 or 1 in that column,

    and the rows would stay the same, but for each row it will show a different value for each user?

    Sorry to disappoint you, but we currently do not have something like this available with our plugin.

    You can suggest it to our developers - they will do their best to make a solution in the future.

    Please feel free to search on our suggestions page

     to see if someone may be already suggested this feature. If you can't see it, feel free to add your suggestion there,  and as more people vote, the feature will move higher on the priority list.

    You can certainly follow our changeLog page if you'd like ( it is also available in the plugin dashboard), where we state any changes/new features/bug fixes during updates;

    and our newsletter, so you're informed about new features, bug fixes, freebies, etc.

    -

    If you have coding skills and wish to try to make a custom solution now,

    you can check out our available hooks for Developers on this documentation and see if you can find any hook that might help.

    Please be advised that custom solutions with hooks are not included in our support.

    You can also research resources such as Stack Overflow to see if any other user perhaps found a workaround.

    ( We do like to give examples for certain solutions, but for this use-case, we, unfortunately, don't have anything yet)

    -

    And i just wanted to point out that you can try wpDataTables before purchasing

     on our sandbox Demo sites ( you can find links for the main plugin Demo,  

    as well as add-on Demos, in my signature),

    and there is a 15-day money-back guarantee period, 

    so if you purchase the plugin, you can safely fully test it out, and if it doesn't fit your needs you can request and receive a refund in that period. ( same goes for all plugins and add-ons)

    Let me know if you have any additional questions. smile.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

  •  5
    Clément replied

    Hi Milos and thank you for this extensive answer, I appreciate it! 

    I better understand the situation now and I have an alternative idea.  

    Let's say we have 2 tables: 

    • The first table contains the same data for everybody. It has a "bookmark" button on the last row.   
    • The second table has the same columns, but is empty. 

    User could then click on the "bookmark" button of the first table to add this row onto the second table. The row would only be visible to him, thanks to the feature we mentioned. 

    Would this be possible without custom dev? If not, would it be easier to accomplish? 

    Thanks again. 

    Clément. 

  •  1,819
    Miloš replied

    Hi, Clément.

    Sorry to disappoint you, but with our current built-in options, we do not have a way to set up the scenario where a user would choose a row from one table by clicking into it,

    and then to pass this row to another table.

    I see what you mean, the desired goal would be to do that, and also storing that user's ID associated with any rows user A selects,

    and then if user B comes, the rows they pick by the "bookmark" button get passed to the second table,

    while each user can see their own rows.

    I really like this idea of a use-case, but unfortunately it is not possible at the moment.

    You could also add this idea on our Suggestions Page, and i hope our devs might work out a solution in the future.

    -

    As far as a custom solution to achieve this, i can't honestly say which one might be easier,

    for your initial idea and for this one, i can't estimate what could be easier for custom work.

    Maybe it can be done with some custom work, 

    but our developers are very busy at the moment, working on some priority tasks and fixing bugs and issues with our plugins, so they won't be having the time for custom work in the near future.

    -

    The only built-in way that can reference columns from another table is if you make foreign key relations with our plugin.

    You can check more details here on how you can make foreign key columns.

    -

    And, you can also make, for example one main Manual Table which stores all data in the database in its own columns and rows,

    while making an additional SQL Query table for these users with "limit the rows they see and edit" feature.

    Check in the Manual Table under Editing for the MySQL Table name,

    then in a new SQL Query table do a Query like : SELECT * FROM TableName,

    ( or select just some specific columns from it if needed),

    and this way Manual Table can be for Admins to see everything, while the second SQL Table can be limited for users, etc.

    -

    But i realise that this is not even close to the "bookmark" use-case that you need.

    I hope that helps.

    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

  •  5
    Clément replied

    Hi there, 

    All right then. Once again, I am very grateful for the time you spend righting these comprehensive messages. I have one last idea in mind, please feel free to be shorter in your answer if this is still not possible. I don’t want to abuse of your time if this is really not possible!

    Let’s still imagine 2 tables: 

    1)    Table 1 is the main one with all the data. Now, let’s imagine that there is one column on this table that is editable by everybody, but this column is invisible. Let’s call this column “User IDs”. To edit this cell on each row, the user would need to click on a button, also present on each row.

    In other words: user click on “add” on one row -> their ID is added to the string of “User IDs”. The “User IDs” column would then look like “23, 84, 19, 71”.

    2)    Table 2 is actually the same table, but there is now a filtering applied to only display the rows with the ID of the user in the string of this specific cell.

    The string may pose an issue to make a clean filtering, and I thought about creating a third table to keep each ID in a different cell, but I wanted to keep it simple. Do you think this would be possible?

  •  1,819
    Miloš replied

    Hi, Clément.

    No problem, i am happy to advise as much as our support can cover, it is no trouble at all.smile.png

    -

    I am not sure if i fully understood all the details of your use-case.


    1. In Table 1, if i understood,

     basically, there would be a hidden String Column as "user ID's",

    and you would have another column with a button "add".

    Then if a user clicks on that column with "add" button in one of the existing rows,

    their ID would be "appended"/"added" in some way to the string of that row in the column "User ID's"?

    Then if an Admin looks at the source data, where he can see the hidden Column "User ID's" , it would show each user ID of the people who clicked on the "add" button from another column? ( as you said for example : 23, 84, 19, 71” and so on)

    -

    Sorry to disappoint you again, but we currently don't have any built-in solution to achieve something like that.

    If you try to use our "users see and edit own rows" feature,

    this can only  add a user ID for adding new rows - then every new row in a table gets their ID in your selected "userID" column.

    But for example, if user 1 has already made one row,

    and user 2 comes to the table, they can not see or edit that row.

    -

    You can of course, also, pre-populate the userID column with 1, 2, 3, and so on,

    then if a user that matches that ID logs in, they would see all rows corresponding with their respective ID.

    -

    If you wish to see a solution for a use-case such as the one you described,

    please add a development suggestion on the page we sent before,

    and our devs will do their best to add a solution in the future.

    You can, of course, try a custom solution with using our hooks, or searching on Stack Overflow,

    but our support is not able to help with custom work.



    2. When it comes to pre-filtering tables for user ID's , though, you can do that, with integer or String Columns.

    I will share some saved examples that i have, just to demonstrate how you can predefine filters for our tables.

    There can be different ways to pre-filter tables in our plugin :

    If you wish to try Pre-filtering tables through URL,  please check out this page with examples.

    -

    You can also use placeholders for table generation.

    1. For example, if you have a MySQL query-based table, you can use this query:

    SELECT * FROM yourDatabaseTable
    WHERE columnName = '%VAR1%'

    %VAR1% can be defined in the Placeholders tab when you're creating a table, 

    or you can pass VAR1 value in the table's shortcode.

    -

    For example if i have this Master Manual Table,

    and i want to make a dynamic SQL Table with VAR1 placeholder.  ( Then later i can input different VAR1 in the table shortcode on different pages).

    7428149389.png

    My example SQL Query for the table will be :

    SELECT * FROM wp_wpdatatable_44
    WHERE company = '%VAR1%'

    First, just to initially generate an SQL table with the VAR1 ,

    i will set the Cakewalk  company name in the VAR1 , in table's Placeholders tab :

    8172791691.png
    5335724844.png

    9566344767.png

    -

    Then, for example, if i want to make a different page for another Company,

     let's say "Adobe".  Then i pass that value in the VAR1 of the table shortcode :

    6925292908.png
    8863319507.png

    2. 

    Or, if you don't add the condition in an SQL query, you can add %VAR1% in column settings -> Filtering, under "Predefined filtering value".

    Then, you can have different versions of the same table, with the VAR1 value passed in the shortcode,

    let's say if we had a "Regions" column and we wish to filter a different region per each page.

    9385158392.png

    If we want page 1 for example only filtered for "Region A" , you can set predefined filter to this column as %VAR1% (filter type has to be set as text) :

    4266306375.png

    Then for a page where we need only Region 1 filtered, use shortcode [wpdatatable id=1 var1='Region A'] ,

    4565461533.png
    6779925578.png

     page 2 for only "Region B", shortcode would be [wpdatatable id=1 var1='Region B'] and so on, 

    to apply the values defined in the shortcode to the filter.

    ( This filtering method can be used for any table type, besides Simple Tables)

    -

    I also made a short video example - please check it out here.


    I hope that helps.


    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