Okay
  Public Ticket #2483427
Table Template for Numerous Copies
Closed

Comments

  • Yuveer Ramchandani started the conversation

    Hiya! 

    I am currently working on a project using wpDataTables and essentially I'm going to need 14 tables with all the same column headings and table settings - in terms of design and functionality (sorting, filtering etc.). Each of the 14 tables will be named differently and will hold different information to be entered by different users.

    I was just wondering if it's possible to create a template table with all my necessary columns so that I can build my 14 tables from this template allowing each to hold different data. Ideally, as I change the settings on the template table (display/sorting/filtering etc.) the same changes will apply to all 14 tables that use the template.

    I believe this is what I'm looking for but I have several questions:

    1. Where do I obtain the correct User ID and how does the table auto-populate this field correctly depending on the user? 
    2. Instead of User ID as an Integer, can I use the Current_User_Login define to each user e.g. "Australia", "Cuba", "Denmark", "Iceland"?
    3. Under each table, I would like to have the same charts, with only the specified user's data being displayed. If I follow the link above, will the charts being displayed also only show the user's data?
    4. Am I correct in assuming that using this method I will only need to create one "Master" Table and one version of each chart as opposed to 14 Tables and 14 copies of the same chart?

    Hope that all makes sense :)

    Thanks in advance!

  •  2,572
    Aleksandar replied

    Hello Yuveer

    Thank you for your purchase.

    If you're going to use Users see and edit only own data, that needs to be one table, not 14 different tables. The data is being displayed differently to logged-in users based on their User IDs.

    If you do need to create 14 different tables with similar settings, you can create one table, set it up, and then duplicate it from the wpDataTables menu. Then, you will be able to change the column headers, change the data in the tables, and so on.

    To answer your questions related to "Users see and edit only own data":

    1. This is coming from wp_users table. All users need to be WordPress users. The field is auto-populated programmatically.

    2. Not if you're going to use the mentioned feature. You could only use this placeholder as a condition in an SQL query based table.

    3. If you use one master table, as the feature intends, then yes - you can enable "Follow table filtering" when creating the chart, and it will always show only what the table currently displays. If you're planning to create 14 different tables, you will also need to generate 14 different charts.

    4. Absolutely correct, just like I mentioned abovesmile.png

    Kind Regards, 

    Aleksandar Vuković
    [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

  • Yuveer Ramchandani replied

    Hi Aleksandar,

    Thanks again for your tremendous help and advice in starting my project. To add some context, I've created one master table, ensuring users can only view the data rows they have added.

    As I progress through the development, however, I am sure to have more questions. One pressing issue I have involves the order of options displayed in SelectBoxes.

    1. On several of my columns I have chosen to use the SelectBox Input Type, defining the values in a list. After inputting some data I realised I needed to add an option or two. Despite adding the new options in my preferred position in the list, upon saving they get pushed to the end. Is there anyway to maintain the list order?
      E.G. Sort options alphabetically with options "None" and "Other" at the bottom?
    2. Another question I have is whether it's possible to have an automated email sent to a specific email address when the Master Table is updated (like a notification email)?
  •  2,572
    Aleksandar replied

    Hello Yuveer

    You're welcome, of course.

    1. The only way you can change the order would be to manually type the order you want to see those options in, in column settings/data and select the values to be added as a "defined values list". You need to re-do that list, and type the options in the order in which you want to see them.

    2. Unfortunately, no. wpDataTables doesn't have any mailing features, and it is not possible to send any emails from it (manually or automatically).

    Kind Regards, 

    Aleksandar Vuković
    [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

  • Yuveer Ramchandani replied

    1. If I re-type the list will the options reset in the data I already have? I'm a little worried I'll have edit 100+ lines of records re-selecting the options I'd have to delete and re-enter.

    2. Do you know of any workaround? Perhaps something that detects when a new row is added to the table and triggers and email?

  •  2,572
    Aleksandar replied

    Hi again Yuveer

    1. If you keep the same values, nothing should change other than the order of the values.

    2. Unfortunately, no. There are no workarounds for this issue, as data is read from the table in the order in which they were added, unless you define it differently in column settings.

    Kind Regards, 

    Aleksandar Vuković
    [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

  • Yuveer Ramchandani replied

    Hi Aleksandar

    I believe I have set up my project's data tables the best way possible for my needs, however, I'm struggling when it comes to how best create my graphs.

    I have 2 tables as follows:
    1. Manual Table: With users only seeing and editing their own data.
    2. SQL Table: Displaying all records (to be used for the administrator's view).

    Currently, when a user logs in they are redirected to the Manual Table to edit and view records. Underneath this table I'd like to have several charts, only factoring in the data that matches their username.

    Charts:
    1. Bar Chart: (X) Month, (Y) Count of Records
    2. Line Chart: (X) Month, (Y) Sum of a Column
    3. Pie Chart: Ratios of 3 select options in column
    4. Pie Chart: Ratios of 2 select options in column
    5. Pie Chart: Ratios of 2 select options in column

    I am finding the Chart Wizard to be very confusing when selecting the columns and series options. 

  •  2,572
    Aleksandar replied

    Hello Yuveer

    I don't know where you're having issues here. Could you provide some screenshots?

    Sum of a column can't be used in a chart, though. The chart can only use the data from column's cells, so calculation functions are not included there.

    Kind Regards, 

    Aleksandar Vuković
    [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