How to set up calculations based on a Matrix field inputs

  • SBSNU
    Asked on October 9, 2015 at 6:39 AM

    The date fields for columns would be dollar value with total across with a final column to the right that would add line totals.

     

    Also from on the Personal Car field in Travel and Expense I need a formula that calculates the mileage entered from Travel information x0.575

  • David JotForm Support
    Replied on October 9, 2015 at 12:03 PM

    Hi,

    I checked your most recent form and it looks like you are still using Matrices rather than the Spreadsheet widget:

    http://widgets.jotform.com/widget/spreadsheet

    I believe my colleague explained the setup of the widget in your previous thread.

  • SBSNU
    Replied on October 9, 2015 at 2:45 PM
    Sorry but I don’t understand the google spreadsheet. This seem cumbersome.
    ...
  • Mike
    Replied on October 9, 2015 at 5:18 PM

    Alternatively, you might try conditional calculations with 'UPDATE / CALCULATE FIELD’S VALUE' conditional logic rules on form.

    Here is an example for one Matrix row.

    How to set up calculations based on a Matrix field inputs Image 1 Screenshot 20

    Note, that you will need to set calculation condition for each row.

  • SBSNU
    Replied on October 12, 2015 at 10:45 PM
    Can you assist me with this please.
    ...
  • Welvin Support Team Lead
    Replied on October 13, 2015 at 12:55 AM

    1. Edit your form

    2. Click "Conditions" in the toolbar

    How to set up calculations based on a Matrix field inputs Image 1 Screenshot 70

     

    3. Setup your conditions:

    a. Set your Rule and click the "Add Field" button:

    How to set up calculations based on a Matrix field inputs Image 2 Screenshot 81

    b. Select the Matrix field. For example, the travel expenses matrix:

    How to set up calculations based on a Matrix field inputs Image 3 Screenshot 92

    c. Click "Show Headers" and select the options in a row that you would like to calculate except the Totals column then click "Insert" button:

    How to set up calculations based on a Matrix field inputs Image 4 Screenshot 103

     

    d.  Add + after each option. For example:

    How to set up calculations based on a Matrix field inputs Image 5 Screenshot 114

     

    d. Select the Output To Field. In this example, I have selected the same matrix which is the "Trave Expenses". You have to select the last option in the row which is the total column:

    How to set up calculations based on a Matrix field inputs Image 6 Screenshot 125

     

    That's it. Repeat the same for the other matrices.

    Thanks