- Firemedic07Asked 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.ÂPage URL:
- JotForm SupportcandyAnswered on November 17, 2016 at 02:10 AM
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.
- BorisAnswered on November 17, 2016 at 08:31 AM
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. :)
- Firemedic07Answered on November 20, 2016 at 04:15 PM
Worked awesome. What would i have to do differnt if I wanted to use a Numeric Text Box instead of the Drop Down?
- JotForm SupportjonathanAnswered on November 20, 2016 at 05:40 PM
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.
- Firemedic07Answered on November 20, 2016 at 05:49 PM
When i do that and enter 1-11 in the fields it enters 111 on the other field
- JotForm SupportjonathanAnswered on November 20, 2016 at 06:18 PM
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.
- Firemedic07Answered on November 20, 2016 at 06:39 PM
This is what happens when I put numbers in.Â
- Firemedic07Answered on November 20, 2016 at 08:19 PM
Figured it out. Thank you all.