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 #3067965
Pre-filter calculation shortcode
Closed

Comments

  • Adam started the conversation

    I want to use the column calculation shortcode to display the sun, but with the table data pre-filtered. Example: [wpdatatable_sum table_id=1234 col_id=54321 var1=apples]

    Is this or

    Something similar possible?

  •  1,692
    Miloš replied


    Hi, Adam 

    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.

    -

    To be fully honest with you, i have been looking into this, but am still not able to confirm with 100% certainty if something like this is possible.

    I will get help from senior colleagues, and i will do my best to be as quick as possible from this point forward.

    As soon as i confirm this, i will report back to you.

    Thank you for your patience.

    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

  • Adam replied

    Thank you. I’d also be open to better understanding how to accomplish this via manual query, but it seems that since I created the tables with a live Google Sheet, there isn’t a DB table to query. 

  •  1,692
    Miloš replied

    Hi, Adam 

    Sorry for all the waiting time.

    Basically, at this time, the only way how you can achieve this by using a shortcode, is if the table is on the same page with the SUM shortcode.

    So, lets' say, for this table i have some clients and amounts of purchases.

    6703177269.png

    If we don't use any VAR or any filtering, the SUM of column for Ammount will be 4613

    -

    But if i add this VAR1 to the column "Clients" filter;

     and place a table shortcode with placeholder together with the SUM shortcode of the column on same page, like :

    [wpdatatable id=7 var1=Holmes]

    [wpdatatable_sum table_id=7 col_id=26 ]

    Then the table will prefilter, and the calculation shortcode will follow it, if they are on same page.

    7265714576.png

    But if i just try to use the SUM shortcode from the non-filtered table version, and add the VAR, it will not work.

    This shortcoe - [wpdatatable_sum table_id=7 col_id=26 var1=Holmes]   will only give us the unfiltered value of SUM

    8344183325.png

    So, basically, the calculation shortcode is only used to pull the SUM value from the table in its current state ( if it is filtered or not),

    but we can not use the calculation function to filter the table itself if that makes sense?

    -

    2.

    And you are correct, when we use tables linked to a file source, or spreadsheet, we are not able to use SQL Queries.

    It is possible, but it requires a high level of knowledge to pull off a custom SQL Query like that.

    Making SQL queries for users is not included in support, but we can always advise and help with some examples.

    -

    If you're interested to learn more how you can use placeholders to make dynamic SQL Queries, please check out this documentation with examples and a video.

    I hope that helps.

    Let me know how that sounds.

    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