• Resolved M3galodon

    (@m3galodon)


    Hello Tobias,

    I’ve used your plugin since the days of WP-Table Reloaded, I’ve looked at many table plugins and this is still my favorite, but I now need to achieve something more complex.

    I need to pull data from the MySQL database and then run some very basic maths with that data (and do this in hundreds of tables). I’m looking at WP-DataTabes to import the data from MySQL, then to import it to a TablePress table.

    My issues/questions:

    1. Is it possible to import cell data from WP-DataTabes to TablePress using Single Cell Content Shortcode. If not, is this something doable?

    2. I’ve tried to import cell data from a different (TablePress) table and run basic math with it (this is what I have in that cell: =[table-cell id=1 cell=B2 /]*3+0.02), but I’m getting this error message: !ERROR! illegal character '[' Anyway to make the math work with data imported from a different table?

    Kind Regards,
    Sebastian

    https://www.ads-software.com/plugins/tablepress/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    1. No, sorry, importing data from WP-DataTables is not possible.

    2. The reason for this is that formulas are by default parsed before Shortcodes. You can however reverse that order using the TablePress Extension from https://tablepress.org/extensions/shortcodes-before-formulas/ Just install and activate that and extend the used table Shortcode to

    [table id=1 shortcodes_before_formulas=true /]

    A suggestion: Instead of using WP-DataTables and then importing from that (if you can find a way for that), it would probably be easier to develop your own small Shortcode that directly makes the mySQL query.

    Regards,
    Tobias

    Thread Starter M3galodon

    (@m3galodon)

    Thanks for the fast reply, the extension you suggested for question No. 2 worked like a charm and it will come in very handy.

    I’m working on a rather complex project (for my skill set) and TablePress with more robust JSON importing capabilities would be the dream solution. I would like to talk more about this but I couldn’t find a way to contact you directly. Can you please comment on this temporary website with some contact info: https://crafting.comli.com/2016/01/27/hello-world/ (comments won’t be published) or let me know I can contact you directly.

    P.S. Please pardon my title mispell

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    great! Good to hear that this worked!

    With “more robust JSON” import, you probably mean that TablePress should understand other schemes/formats than its own? I’m not sure that this will be possible. My email is in the main plugin file “tablepress.php”, if you want to get in touch.

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Referencing data from another tables and formulas’ is closed to new replies.