Okay
  Public Ticket #3684703
Fetch the number of rows of a linked table
Closed

Comments

  • Guneet started the conversation

    We want to show a datatable linked to a Google Spreadsheet in our website. On a different webpage in the website we want to show the number of rows in the spreadsheet. Is there a way to fetch this number? We can write a custom function that caches this number and shows it via a shortcode.

  •  1,819
    Miloš replied

    Hi Guneet,

    We don't have a native option to fetch the total number of rows from a table and post it somewhere, but you can achieve this with a workaround.

    You can add a Formula Column to your Table linked from the Google Sheet, and just write "1" in the Formula.

    This will serve as a "row counter".

    9600050734.png

    Now, you can activate to calculate the Total for this Formula Column and as you can see on my example table, it counts all the rows correctly.

    In my example, this table has a total of 105 rows.

    1057622139.png

    You can then copy the SUM calculation's shortcode of this Formula column and paste it anywhere on your Front-End on any Page.

    2525195852.png
    7778105816.png

    This way, you can achieve your goal to fetch the total number of rows and present it anywhere on your Site.

    Let me know if that works for your use-case.

    Just note, the Formula Column  is not available in the Starter licence plan, so if you need it, you would need to purchase any of the higher level Plans, such as "Standard" or higher.

    You can compare the features between all Plans from Lite(free), then Premium versions from the Starter all the way up to the Developer Level, in the Plugin back-end Dashboard, under "Lite vs Premium".

    You can also see this on the pricing Page, but here in the Dashboard, we show more details about each specific feature, etc.

    If you don't have any installation now on your WordPress, you can easily see this on our Demo Sandbox Website.

    4723876837.png

    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