What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.
At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.
We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.
How to pass the highest selected number in a matrix to another fieldAsked by Firemedic07 on November 16, 2016 at 10:35 PM
I have a drop down style number selector 0-400 that there are multiple selections. I am looking to put the highest number selected in another field in my form.
selected another put
I have cloned your form in order to test it on my side. As I have understood your question, you have wanted to set a predefined value to the dropdown lists of the matrix. If so, as I have check it is not possible to set a predefined value to a matrix.
What I do not understand is what do you mean by "I am looking to put the highest number selected in another field in my form." Which field in your form, do you want to set the highest number? In the matrix, or in the another field of your form?
Could you please explain your question further?
Waiting for your response.
Thanks in advance.
There is another field on the form called "highest level of CO". I want that to auto populate with the highest number that was picked in the drop down "CO Detector Findings"
This is possible by using our insert/calculate type conditions, but it may appear to be tedious when setting it up. Basically, we will use conditional logic to pass a value from the Matrix field to your desired Text Box field:
You can see a demo form of this functionality here:
Now, in order to achieve that requirement, we will perform several steps. please make sure to follow the steps correctly in order for the calculation to work the way you asked.
1. We should add an insert/calculate condition to your form. We will set it up so that "IF Matrix field is filled, DO calculate a field's value", and then click on the ... button to add a mathematical function:
2. Add the max() function:
3. Place your cursor inside the max() function, which means inside its brackets ( and ), and then click on the Add Field button:
4. Select the Matrix field, and then make sure to select all its checkboxes that appear, and then its Done button:
5. Now comes the trickiest part. The above steps have left us with all the individual rows of the Matrix field inside the max() function, but now we need to separate the fields with a mathematical comma. This is how the calculation looks at the start of step 5:
Now, you need to click between each and every two rows, and add a comma in between:
This has separated each row with a comma, but if the background of the comma is light gray, it means the comma is literal text, and not a mathematical one.
6. In order to change each comma to a mathematical one, simply click on the comma until it gets the same dark background as the 0-9 numbers have:
7. Finally, complete the condition by selecting the "Summary" field where it will forward this calculated value, and click on Save:
This should leave you with the same functionality that is demonstrated in the form linked above. Please try it out, and let us know should you run into any snags along the way or if you need further assistance setting it up. :)
Worked awesome. What would i have to do differnt if I wanted to use a Numeric Text Box instead of the Drop Down?
You meant you want to use Numeric textbox as the input type in your Matrix table field?
You can go ahead and change it in the Matrix table option in the toolbar...
The functionality should still work as can be test on this form https://form.jotform.com/63246397528971
Let us know if you need further assistance.
When i do that and enter 1-11 in the fields it enters 111 on the other field
Can you please describe more how to produce that issue.
I test the form https://form.jotform.com/63246397528971 but I could not see it.
This is what happens when I put numbers in.
Figured it out. Thank you all.