How to send emails based on the highest value

  • info670_Giuseppe_info
    Domanda del 2 marzo 2024 alle ore 14:03

    Buongiorno, chiedo cortesemente aiuto su come impostare un calcolo delle risposte ad un questionario con email di risposta a chi lo ha compilato, in base alla risposte date a ciascuna domanda.

    Faccio un esempio (ho già creato il moduo, del quale metto il link nel campo pervisto sotto):

    Creo un modulo questionario di 20 domande, ciascuna delle quali con due opzioni di risposta: "Condivido" e "Non condivido".

    Per ciascuna domanda, vado poi a prendere in considerazione solo le risposte con "Condivido".

    Le risposte con "Condivido" poi devo andare a sommarle a seconda del numero della domanda, per rendere un determinato risultato.

    Faccio un esempio: somma delle risposte "Condivido" delle domande 2-4-7-17-20. La somma di quante di queste domande hanno avuto la risposta "Condivido" rende un risultato, che può essere da 0 a 5: 0 se appunto nessuna delle 5 domande ha avuto risposta "Condivido", 5 se tutte hanno avuto risposta "Condivido".

    La stessa cosa devo poi farla per le domande 3-10-13-16-19.

    La stessa cosa devo poi farla per le domande 1-6-9-11-14.

    La stessa cosa devo poi farla per le domande 5-8-12-15-18.

    Quindi otterrò 4 punteggi differenti, che devo tenere separati e che mi dano appunto 4 tipologie di risultato (da tenere nascosto a chi compila il form on line), per le quali poi configurerò una specifica email di risposta a chi ha compilato il questionario.

    La mia domanda quindi è: come imposto la modalità di calcolo per avere i 4 totali separati?

    Ho già preparato la base del questionario, metto il link nel campo sotto al messaggio.

    Ringrazio anticipatamente e infinitamente per il supporto.


    Giuseppe Ramerini


  • Kris Jotform Support
    Risposta del 2 marzo 2024 alle ore 16:45

    Hi Giuseppe,

    Thanks for reaching out to Jotform Support. Currently, our Italian Support agents are busy helping other Jotform users. I'll try to help you in English using a translator tool, please reply in whichever language you feel comfortable using. Or, if you'd rather have support in Italian, let us know and we can have them do that. But, keep in mind that you'd have to wait until they're available again.

    It seems that the link to the form you provided was not attached to your message since it is not visible on our end. I also checked the Jotform account you used to open this support ticket but the forms do not have the answer 'I agree' and 'Not'. Did you create the form on another Jotform account?

    In the meantime, please check out the following helpful guides that might help you with the requests/questions you have.

    How to Perform Calculations Using a Widget

    How to Send an Email Based on a User's Answer

    How to Change Your Thank You Message Conditionally

    How to Change the Thank You Page URL Conditionally

    Once we hear back from you, we will further assist you.

  • info670_Giuseppe_info
    Risposta del 3 marzo 2024 alle ore 02:25

    Hi Kris,

    thanks for reply.

    The name fo the form is "Clone of Test Attitudine di Vendita" and it was created on the same account from which I request assistance.

    I put the link that appear in my browser again, to the page where I am creating the form, and also the sharing link created for the form: I hope that this way it will be possible to log in to see it.

    Link to the creation page: https://eu.jotform.com/build/240615490834356

    Link to the form: https://form.jotform.com/240615490834356

    I also ask if I was able to understand my need, in relation to the result I should obtain.

    Thank you again for your kindness and quick response.


    Giuseppe

  • Ericson_B Jotform Support
    Risposta del 3 marzo 2024 alle ore 04:43

    Hi Giuseppe,

    Thanks for getting back to us. You'll need to assign a calculation value for each question, such as 1 for Condivido and 0 for Noncondivido. Then, after entering a calculation value into the 2-4-7-17-20 field, we'll add it to the form calculation widget. Let me show you how:

    1. In Form Builder, click on the fields that you want to include in the calculation.
    2. Go to Options tab.
    3. Enable the Calculations Values.
    4. Enter 1 for Option A.

    How to send emails based on the highest value Image 1 Screenshot 30

    We've now added calculation values for the 2-4-7-17-20 fields. We will now include them in the form calculation widget. 

    1. Click the Totale or form calculation widget and select the Wand icon.
    2. Click the Add Field Button and type in the 2-4-7-17-20 fields.
    3. Add them one by one, with a + sign between the fields. 

    How to send emails based on the highest value Image 2 Screenshot 41

    If you want to accomplish this with other questions, you must do the same thing, but you will need to add another form calculation widget for each question if you want a different result. 

    Let us know if there's anything else we can help you with.

  • info670_Giuseppe_info
    Risposta del 3 marzo 2024 alle ore 13:10

    Hi Ericson,

    thanks for reply.

    I also thought I had to do 4 different calculation forms, one for each result, but I didn't know how to set up the calculation. Thanks for the detailed explanation.

    My final need is to send to those who filled out the questionnaire a response email with the highest of the 4 values obtained from the calculations.

    How can I do it, given that I have to send a different email for each of the 4 values?

    Thanks for your patience and support.


    Giuseppe

  • info670_Giuseppe_info
    Risposta del 3 marzo 2024 alle ore 13:29

    Hi Ericson,

    I have already created the 4 calculation forms for each of the 4 totals.

    Now how can I send the response email relating to the one of the 4 with the highest value?

    Thanks again for your patience and support.


    Giuseppe

  • Lesther Jotform Support
    Risposta del 3 marzo 2024 alle ore 15:53

    Hi Giuseppe,

    Thanks for reaching out to Jotform Support. I see that you're already using the Change Email Recipient condition. This is what's needed to conditionally send an email based on the user response. Now, what are your criteria for sending a specific email? Are you sending 4 emails, or are you sending 1 email based on the highest score among the 4 calculations? This may need lots of possible IFs to cover all the possible outcomes.

    After we hear back from you, we’ll have a better idea of what’s going on and how to help.

  • info670_Giuseppe_info
    Risposta del 3 marzo 2024 alle ore 16:40

    Hi Lesther,

    thanks for reply.

    Following the instructions I received, I created 4 calculation forms, each of which yields a result.

    Each of these 4 forms has a specific response email (4 different response emails, which I will write).

    However, I must send to those who filled out the complete questionnaire only the response email relating to the form that achieved the highest score among the 4.

    This is where more "if" functions are needed.

    I hope I have explained correctly what I need to realize.

    Thanks again for your patience and support.



    Giuseppe


  • Ericson_B Jotform Support
    Risposta del 3 marzo 2024 alle ore 16:51

    Hi Giuseppe,

    Thanks for getting back to us. You must create a change email recipient condition for each field similar to the one shown in the screenshot. Let me show you how:

    1. In Form Builder, in the orange navigation bar at the top of the screen, click on Settings.
    2. Click on Emails on the left side of the screen.
    3. Add a new Change E-mail Recipient condition.

    How to send emails based on the highest value Image 1 Screenshot 30

    Then set up the condition as shown below. Keep in mind that there are 4 field calculations, so you must create four similar conditions with different IFs for each.

    How to send emails based on the highest value Image 2 Screenshot 41

    Let us know if there's anything else we can help you with.

  • info670_Giuseppe_info
    Risposta del 4 marzo 2024 alle ore 03:44

    Hi Ericson,

    thanks for reply.

    I followed your instructions, but something isn't working as I would like.

    I set up all the conditions following your scheme, but then I asked myself the problem of having to give a priority to a specific condition, if this one had the same score as the other: this is an option that could occur often.

    For this reason, I created some new conditions, which you can see in my account, and I did a first test.

    By doing this, the system sent me all four of the expected emails (instead it should have only sent one).

    So I turned off the priority conditions in case of equality, and ran a new test.

    Also in this case, I received three different response emails.

    What can we do to resolve this critical issue?

    can you help me?

    Thanks again for your patience and support.


    Giuseppe

  • Richie Jotform Support
    Risposta del 4 marzo 2024 alle ore 05:59

    Hi Giuseppe,

    I understand your requirement, but I’ll need a bit of time to work out a solution. I’ll get back to you shortly.

  • info670_Giuseppe_info
    Risposta del 4 marzo 2024 alle ore 06:01

    Hi Richie,

    tanks for reply, I await with confidence.


    Giuseppe

  • Richie Jotform Support
    Risposta del 4 marzo 2024 alle ore 06:44

    Hi Giuseppe,

    Thanks for patiently waiting. To be able to send the specific email, you need to add a condition to identify the score. You can add a form calculation widget to get the max score. Let me show you how:

    1. In Form builder, click on Add Form Elements.
    2. In Form Elements, click on Widgets tab.
    3. Then, search Form Calculation widget.
      How to send emails based on the highest value Image 1 Screenshot 50
    4. In Form Calculation widget, click f(x) icon.
    5. Scroll down and click on max function.
    6. Then, click on Add field and select your calculation widgets.
    7. Separate each field with a comma.
      How to send emails based on the highest value Image 2 Screenshot 61
    8. Now, we can add the condition if the score is equals to the calculation it would send the email:
      IF : Score
      STATE : Is Equal To
      TARGET : Another Field
      FIELD : Problem Solver
      SEND : Problem solver(email)
      How to send emails based on the highest value Image 3 Screenshot 72

    You must do this to all calculations. Check out this screenshot of my result:

    How to send emails based on the highest value Image 4 Screenshot 83


    Give it a try and let us know if this works for you.

  • info670_Giuseppe_info
    Risposta del 4 marzo 2024 alle ore 08:02

    Hi Richie,

    thanks for reply: i'll try and let you know.

    Thanks again.


    Giuseppe



  • info670_Giuseppe_info
    Risposta del 4 marzo 2024 alle ore 10:44

    Hi Richie,

    can you please check my form settings? I think I followed the instructions correctly, but something isn't working: I took a test and received 6 emails in response to the test...

    Maybe I did something wrong, but I don't know what, or the system isn't able to handle this type of response.

    Thanks for your patience and support.



    Giuseppe

  • Kris Jotform Support
    Risposta del 4 marzo 2024 alle ore 11:19

    Hello Giuseppe,

    Thank you for getting back to Jotform Support and updating us about the result that you are getting. Can you guide us on how you filled out the form resulting in getting 6 form emails? Also, I saw that you have multiple Change E-mail Recipients on your form. Can you tell us which form emails you received?

    It would allow us to understand what’s happening if you could take a screenshot and send it to us. We have a guide here explaining how to do that.

    We will move forward in our investigation as soon as we receive a response from you.

  • info670_Giuseppe_info
    Risposta del 4 marzo 2024 alle ore 11:45

    Thank you, Kris.

    the email settings are in order, I believe I have followed the instructions correctly and performed the right configurations.

    The 6 emails received were with the following results:

    3 email with result "Penna Proibita"

    2 email with result "Impiegato"

    1 email with result "Problem solver"

    When taking the test, I deliberately answered in such a way as to have the items "Forbidden Pen" and "Problem Solver" appear in the same score, so as to verify, in the event of equality, whether the set rule had worked.

    I attach screenshots of both the notification I received and the 6 emails received in response to the form.

    The settings are visible in my account.

    Thank you again for your patience and support.

    How to send emails based on the highest value Image 1 Screenshot 40How to send emails based on the highest value Image 2 Screenshot 51How to send emails based on the highest value Image 3 Screenshot 62

    Giuseppe

  • Kris Jotform Support
    Risposta del 4 marzo 2024 alle ore 11:59

    Hi Giuseppe,

    Thank you for the details of the form emails that you received. Since you provided the form emails with the answers you added. Can we make a test submission on your original form and add the same answers you have to see if we can replicate the issue? Also, which Change E-mail Recipients you are expecting to receive based on the answers you added to the questions?

    We appreciate you doing this for us, we’ll wait for your response to proceed.

  • info670_Giuseppe_info
    Risposta del 4 marzo 2024 alle ore 13:27

    Hi Kris,

    thanks again for patience and support.

    Of course, try to replicate everything yourself.

    Below I will give you the answers to give to each question, to obtain the same result/problem that I had.

    Simply answer "Condivido" to the questions:

    1-2-4-6-7-9-11-14-17-19.

    These generate 5 points for the "Problem solver" type and 5 points for the "Penna Proibita" type.

    According to the criteria set, in this case only the expected response email for "Penna Proibita" should be sent, but in reality as many as 6 are sent, as you have seen.

    Let me know how it goes.


    Giuseppe

  • Lesther Jotform Support
    Risposta del 4 marzo 2024 alle ore 14:10

    Hi Giuseppe,

    Thanks for getting back to us. The commas (,) in the field Calcolo Finale are all written as a string, these should be in the Number format so it will be part of the mathematical function. See the image below:

    How to send emails based on the highest value Image 1 Screenshot 50

    To correct this, click on each comma to turn the color into navy blue. Refer to the legends below the calculator keys. Make sure to click on the Save button after editing. See the difference in the image below:

    How to send emails based on the highest value Image 2 Screenshot 61

    Now, no other condition should exist in your form except the ones shown in the image below. The field Calcolo finale will compare all the values among the 4 calculations and get the highest values. If there's a tie, it will display the same value. So, the condition should only compare the score to this field. If the score is equal to it's value, it will send the email.

    How to send emails based on the highest value Image 3 Screenshot 72

    I submit a test submission on my demo form by answering "Condivido" to questions: 1-2-4-6-7-9-11-14-17-19-20. I did not hide the Form Calculation widgets to make sure that the target result was achieved. This produces 5 scores for Problem solver and Penna Proibita. Here's the screencast:

    How to send emails based on the highest value Image 4 Screenshot 83

    Test my demo form on this link. Clone it to own a copy and be able to see the entire setup. Here's the guide on How to Clone an Existing Form From a URL.

    Let us know if you have any other questions.

  • info670_Giuseppe_info
    Risposta del 7 marzo 2024 alle ore 06:34

    Hi Lesther,

    thanks for reply.

    At this point, the only thing I would like to achieve - if possible - is that in case of equal scores, the system gives sending priority to only one of the two result conditions, selected by me.

    In your example - and I thank you again for this - both response emails are sent, when in reality I would like to send only one.

    Obviously this condition can only occur when we have two equal values, while every time there is only one value higher than all, only the response email for that value will be sent.

    How can we do?

    Is this option possible?

    I hope I was able to explain myself well...

    Thanks again for your patience and support.


    Giuseppe


  • Eiron_O Jotform Support
    Risposta del 7 marzo 2024 alle ore 09:08

    Hi Giuseppe,

    Thanks for getting back to us. I'll need a bit of time to work on a solution. I'll get back to you with an update as soon as I can.

    Thanks for your patience.

  • Eiron_O Jotform Support
    Risposta del 8 marzo 2024 alle ore 10:04

    Hi Giuseppe,

    Thanks for waiting patiently. In the case of equal scores, you can create another condition to send which Autoresponder email if the Calcolo Finale is equal to two fields. Let me show you how:

    • In the conditions, create another Change Email Recipient condition.
    • The condition should be, if the Calcolo Finale is equal to Problem Solver, and Penna Probita, then select which Autoresponder should be sent.

    How to send emails based on the highest value Image 1 Screenshot 20

    This will send the problem solver autoresponder email if the calcolo finale is equal to Problem Solver, and Penna Probita.

    That's it. Give it a try and let us know how it goes.

  • info670_Giuseppe_info
    Risposta del 8 marzo 2024 alle ore 11:42

    Hi Eiron,

    thank for reply.

    I have different conditions to satisfy:

    1- if I have an absolute value higher than all, only the email corresponding to that value must be sent.

    2- if I have two equal values as maximum scores, I have to choose which of the two emails should be sent.

    I have to make this second point on several cases. Here they are:


    If Problem solver = Penna Proibita - send Penna Proibita

    If Problem Solver = Amicone - send Amicone

    If Problem Solver = Impiegato - send impiegato

    If Penna Proibita = Amicone - send Amicone

    If Penna Proibita = Impiegato - send Impiegato

    If Amicone = Impiegato - send Impiegato


    Should I therefore create these 6 new conditions, in addition to the ones I have already set, which calculate the highest absolute value?

    It's right?

    Thanks again for your patience and support.


    Giuseppe

  • Lesther Jotform Support
    Risposta del 8 marzo 2024 alle ore 12:02

    Hi Giuseppe,

    Thanks for reaching out to Jotform Support. Please give me time to test this theory, I'll get back to you shortly.

  • info670_Giuseppe_info
    Risposta del 8 marzo 2024 alle ore 12:13

    How to send emails based on the highest value Image 1 Screenshot 50How to send emails based on the highest value Image 2 Screenshot 61How to send emails based on the highest value Image 3 Screenshot 72How to send emails based on the highest value Image 4 Screenshot 83Hi Lesther,

    thanks for reply.

    I tested the proposed function, but I always receive both emails.

    I deliberately created the response condition "Problem solver" = "Pen Forbidden", but both emails were sent.

    I disabled the previous conditions for calculating the largest absolute value, but the problem persists.

    I attach screenshots of the 2 emails I received.

    I'm starting to believe there's no way this can be resolved....

    Thanks for your patience and support.



    Giuseppe

  • Lesther Jotform Support
    Risposta del 8 marzo 2024 alle ore 12:32

    Hi Giuseppe,

    Thanks for waiting. I've modified the condition in my test form. I made several tests, and it satisfies the scenarios that you mentioned.

    How to send emails based on the highest value Image 1 Screenshot 20

    Open this link to test my demo form, clone it to own a copy, and be able to see the entire setup. Here's the guide on How to Clone an Existing Form From a URL.

    Keep us updated and let us know if you need any more help.

  • info670_Giuseppe_info
    Risposta del 9 marzo 2024 alle ore 04:49

    Hi Lesther,

    thanks for reply.

    I have done several tests and everything seems to work correctly.

    The only thing that occurred was the double sending of the same email in a simulation where the results of the "Penna Proibita" and "Problem solver" were the same: in that case, the condition is to send the "Penna Proibita" email, which is been done, but twice.

    It wouldn't be a big deal, as the message is the same, but if it could be avoided it would be preferable.

    Can you check the settings I made in to see if there is anything that needs to be changed?

    Thank you once again for your patience and support.



    Giuseppe

  • Lorenz Jotform Support
    Risposta del 9 marzo 2024 alle ore 09:05

    Hi Giuseppe,

    Thanks for getting back to us. I checked your form and I was thinking it may have been because of these two conditions I highlighted in my screenshot below:

    How to send emails based on the highest value Image 1 Screenshot 20

    As you can see, both conditions are set to send Penna Proibita email if met. There's a high chance that if you the condition at the bottom of the screenshot is met, the top condition gets triggered as well. Say for example I have this set of results:

    • Problem Solver = 2
    • Amicone = 1
    • Penna Proibata = 2
    • Impiegato = 4
    • Calcolo Finale = 2

    Let's start with the highlighted condition at the top. Basing from my example results:

    • Penna Proibata is not equal to Impiegato
    • Penna Proibata is not equal to Amicone
    • Calcolo Finale is equal to Penna Proibata

    So the condition at the top gets triggered, right? Now, for the condition at the bottom, still basing from the same example results:

    • Calcolo Finale is equal to Penna Proibata
    • Calcolo Finale is equal to Problem Solver

    So that triggers the bottom condition as well. Generally, there's a possibility that both conditions are met at the same time, sending the same Email Notification.

    I can only assume that the top condition highlighted on the screenshot should trigger only If Calcolo Finale is equal to Penna Proibata, right? If so, then you can add another IF statement like below:

    • IF Penna Proibata is not equal to Problem Solver.

    Give it a try and let us know if there's anything else we can help you with.

  • info670_Giuseppe_info
    Risposta del 9 marzo 2024 alle ore 12:29

    Hi Lorenz,

    thank for reply.

    I disable the condition "Calcolo finale is equal to Penna Proibita" and "Calcolo finale is equal to "Problem solver" send "Penna Proibita" email, and i received only the "Penna Proibita" email.

    I check other cases, everything seems to work correctly.

    Thank you for your patience and precious support.



    Giuseppe


  • Kris Jotform Support
    Risposta del 9 marzo 2024 alle ore 12:47

    Hello Giuseppe,

    Thank you for updating us and letting us know about this. We're glad to know that the forms emails worked the way they should by following the instructions of my colleague. We have marked this support ticket as ‘Resolved’. Please don’t hesitate to message us again or open another support ticket if you need further assistance with your account and forms.

    Reach out again if you have any other questions.