Need help with calculation from Form Field values

  • ag16095
    Asked on May 15, 2021 at 5:16 PM
  • Mike_G JotForm Support
    Replied on May 15, 2021 at 7:20 PM

    We will be glad to help you with your concern. Kindly give us the details of the calculation you would like your form to perform and we will be glad to assist you in setting it up.

    We will wait for your response.

  • ag16095
    Replied on May 16, 2021 at 1:55 AM
    Hi,
    I want to find (calculate):
    the highest of the marks in the class
    the next highest, and
    the next highest - so
    1st, 2nd and 3rd place
    and (somehow) record the placings against the respective Performers.
    Thanks for your help!
    Get Outlook for iOS
    ________________________________
    ...
  • John Support Team Lead
    Replied on May 16, 2021 at 7:58 AM

    This is what I see when I check your form:

    1621165553 60a105f175311  Screenshot 10

    So to determine the highest mark you can add a form calculation widget into the form and use this formula shown in this video I created to better illustrate it: https://www.loom.com/share/542b6b39d4eb4dc2b28f6b5cc8b9eba8

    Now, I am not sure about this part:

    "and (somehow) record the placings against the respective Performers."

    Could you please describe this a bit more telling us how you want it to work with your form? In that way, we could check for methods we can use to achieve the said requirement.


  • ag16095
    Replied on May 16, 2021 at 8:55 AM
    Hi,
    Thanks for the reply and video - great!
    Having thought a bit more, how about:
    I add a hidden Place field (limited to value 1, 2 or 3) next to every Mark field; then, when a Performer is ranked 1st, 2nd or 3rd, that Performers Place field gets an input value from the hidden calculation widget and becomes visible.
    Does that make sense? And can it be done?
    Thanks
    Get Outlook for iOS
    ________________________________
    ...
  • Amin JotForm Support
    Replied on May 16, 2021 at 11:29 AM

    Hi again,

    When you say "...gets an input value from the hidden calculation widget and becomes visible", what calculation and input value are you referring to here?

    Apologies, but I can't understand your last concern fully.

    We would be so much grateful if you could just further elaborate and provide more information, so that we can better assist you.

  • ag16095
    Replied on May 16, 2021 at 12:33 PM
    Hi,
    Sorry Im not being clear. Maybe this will help:
    Example (Field, Value, Field, Value):
    Perf 1 Alfie Mark 86
    Perf 2 Billy Mark 85
    Perf 3 Charlie Mark 87
    Perf 4 Dave Mark 82
    Perf 5 Eddie Mark 88
    I would like the hidden calculators to work out that Perf 5 is 1st (highest), Perf 3 is 2nd and Perf 1 is 3rd. [I understand the nth function.]
    With a Hidden Place field next to each Mark field, the Form would ideally show:
    Perf 1 Alfie Mark 86 Place 3
    Perf 2 Billy Mark 85 Place empty
    Perf 3 Charlie Mark 87 Place 2
    Perf 4 Dave Mark 82 Place empty
    Perf 5 Eddie Mark 88 Place 1
    The empty Place fields stay hidden.
    So, if there are 3 hidden Form calculators, working out nth(1), nth(2) and nth(3), Im asking how do I transfer the n value 1, 2 or 3 (but not the Mark!) into the respective Place field. Or can you suggest some other way?
    Thanks again and for quick replies!
    Get Outlook for iOS
    ________________________________
    ...
  • John Support Team Lead
    Replied on May 16, 2021 at 1:47 PM

    Hmm. This might need several conditions. Let me check for a possible solution and get back to you here with my findings.

  • ag16095
    Replied on May 16, 2021 at 2:00 PM
    Great - thanks ever so much!
    Get Outlook for iOS
    ________________________________
    ...