Okay
  Public Ticket #2439575
Creating a form
Closed

Comments

  • Magda started the conversation

    Hi-

    I've just purchased the plug-in. I'm trying to replicate an Excel spreadsheet I have designed to calculate cost of a recipe (for baking). I have a question. 

    I have designed a table called Product List, which lists: product name, manufacturer, date purchased, price, weight of the product. The last column calculates product price per 1g of weight. This table is user restricted - so each user can only edit and see their own table.

    I'm trying to create a second table which will calculate the price for the recipe, based on the product prices entered in the Product List table. Basically, I'd like a user to be able to pick a product from a dropdown list (list of products entered in the first table, Product List table), enter the weight used in a recipe, and then have a column which will calculate the cost per weight used in the recipe. So 3 columns: Product name, weight, price where product name is selected from a drop down list, weight is entered by the user, price is calculated (weight * price per 1 g from Product List table).

    Also, the second table would calculate price for the recipe based on the logged in user's Product List table.

    How can I create the second table to perform these calculations?

    I have attached screen shoots of my tables I designed in Excel. There, I had one table for the list of products. Second tab was calculating recipe cost based on the products chosen.

    Here is a link to the Excel file. https://akademiatortu.pl/wp-content/uploads/Wycena-przepisu.xlsx

  •  2,507
    Aleksandar replied

    Hello again Magda

    Unfortunately, the formula columns can only be applied to the table they are in.

    You would need to pull the data from the other table with Foreign Keys, but even with those I'm not sure it would work that way, simply because foreign keys are using string-type columns to pull the data, and string data is invalid in a formula column.

    Maybe you could import the tables in the database, and then create a custom SQL query which would calculate the data you need, and it will show only to the currently logged in user using the %CURRENT_USER_ID% placeholder.

    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

  • Magda replied

    Thank you. Unfortunately it will not work simply because it can not calculate a sum under a calculated function column.

    I have also tried creating a table with MySQL call to database, but unfortunately I cant add columns to that table where user could add his own data as well.

    I'm afraid this plugin will not work for me. How can I request a refund? I only just purchased the plugin. Thank you.

  •  2,507
    Aleksandar replied

    Hi Magda

    I'm sorry to hear that, but I can understand.

    Please log into http://store.tms-plugins.com/ with the credentials you received in your e-mail when you purchased the plugin, then navigate to Purchases/wpDataTables, and if you're still within 15 days from purchase you will see the "Request Refund" button.

    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