Custom calculations in a Matrix like way

  • Profile Image
    lgubbins
    Asked on May 11, 2015 at 02:37 PM

    Hi there,

    I am using a matrix to collect data. I want to create a condition that, if under "Commission," the user types "Yes," the Amount will be multiplied by 0.1 and populate into "Commission Amount."

    I created this condition:

    If [Matrix] field contains [Yes]
    [Amount] * 0.1 
    Output field: [Commission Amount]

    I also want to create a condition when, if the user puts in "No," the commission amount will be zero.

    However, I noticed if the words "no" or "yes" appear anywhere else in the matrix (for example, if a field includes the name Norway), things get messed up. Is there a way to indicate in the Conditions wizard I want to search for the stand-alone words "Yes" and "No" and not words containing them? I tried quotation marks but it didn't work.

    Alternatively, is there a way to write conditions for matrix-level inputs? My problem would be solved if I could make the condition specific to one column.

    Thanks so much in advance!

  • Profile Image
    Mike
    Answered on May 11, 2015 at 04:24 PM

    Thank you for contacting us.

    Unfortunately, I have not found any workarounds for Matrix calculations in this case.

    You might consider using calculations based on standard inputs instead of the Matrix fields. I have created an example where you can add up to 3 items based on conditional logic.

    Form:

    http://form.jotformpro.com/form/51306073616954

    You can clone it to check the back end.

    Please feel free to contact us if you need any further assistance. We will be happy to help.

  • Profile Image
    lgubbins
    Answered on May 11, 2015 at 04:27 PM

    Thanks!!!!

  • Profile Image
    raul
    Answered on May 11, 2015 at 04:34 PM

    You can check this guide: http://www.jotform.com/help/90-Form-Field-Positioning to learn how to position fields in your form and you can also clone the example provided by Mike by following the steps provided here: http://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL 

    Let us know if you need further assistance.
    We'll be happy to help.