How can I create a condition on a matrix?

  • Profile Image
    Asked on September 29, 2016 at 10:06 AM


    I have a matrix titled Health History Past or Present on my form: The first ten choices have an asterisk next to it to indicate to parents that if they select YES to any of those asterisk items then we are going to need an additional form to be filled out. I have two autoresponders emails set up. One is for everyone who hits submits will receive. The 2nd is identical to the first except I want anyone who marks YES to any of the asterisk items in the matrix to receive the 2nd email which has the additional form they need attached instead of Email 1. 

    I was trying to figure out how to set up the condition to do this but I wasn't able to figure it out. Will I have to make 2 separate matrixes? One for the asterisk items and the other for those who don't require an additional form? 


  • Profile Image
    Answered on September 29, 2016 at 01:12 PM

    Unfortunately, you cannot set it up like this:


    The reason is because your first "IF" statement cannot identify the "*" on the value of the matrix field, because the answer depends on the column selected. In your case, the columns are "YES" and "NO". Another problem is that the matrix field consists of multiple rows, meaning it does not output a single input, meaning have the 2nd "IF" statement will not work because you have multiple rows.

    What might work is setting up a form calculation widget to fetch the input for the rows with "*".

    Here's how:

    1. First, add a form calculation widget in your form. This is the field that will fetch all the input from rows 1-10 of your matrix field.


    2. Now in the widget setting, add the specific rows from the matrix field that needs to be checked or evaluated. Use the "Add Field" button. Here's a screencast to show how I added mine:

    - Make sure to set the input type from "0-9" to "A-Z".

    - Separate each field with a space or a comma.


    3. The final output would look like this:


    4. In your live form, you can see that the first ten rows (the ones with the asterisk will have the inputs in your form calculation widget.


    5. Now based from that widget, we can now rewrite your conditional logic for the autoresponder to something like this:

    So what my condition states that if the field "Rows 1-10" widget CONTAINS a value of "YES", meaning any of the rows has an answered "YES", then send the "Autoresponder - Doctor's note" to the specific address. 


    I hope that helps.

    Note: You need to specify the email field name in your conditional logic to where to send the autoresponder. You can learn more about the conditional logic for email alerts on this guide: