How Do I Get Selected Options in a Drop Down to Populate Multiple Calculation Fields With Different Values?

  • Driftcenter
    Asked on March 25, 2015 at 4:13 AM

    Hi

    I wonder if there is a way to split up/show selected texts from a drop down field.

    I have several options in the drop down menu, like:

    A
    B
    C
    D

    And i have figured out how to show one result in a calculation field by using the calculation values in the drop down menu. But i want to show several options in several calculation fields that all linked from one drop down menu.

     

    Drop down

    A
    B
    C
    D

    (will show)

    Calc1

    1
    2
    3
    4

    Calc2

    A1
    A2
    A3
    A4

    Calc3

    B1
    B2
    B3
    B4

     

     

  • abajan Jotform Support
    Replied on March 25, 2015 at 10:05 AM

    Please have a look at this demo. If that's the functionality you wanted, there are a couple of ways to achieve it. Here's the method used in the demo:

    1. Insert the following calculation values into the drop down's properties:

    How Do I Get Selected Options in a Drop Down to Populate Multiple Calculation Fields With Different Values? Image 1 Screenshot 70


    2. For the first calculation field (Calc1) just add the drop down field:

    How Do I Get Selected Options in a Drop Down to Populate Multiple Calculation Fields With Different Values? Image 2 Screenshot 81


    3. For Calc2 and Calc3, "Update a form field value" conditions would need to be created:

    How Do I Get Selected Options in a Drop Down to Populate Multiple Calculation Fields With Different Values? Image 3 Screenshot 92


    For Calc2, create the following condition:

    How Do I Get Selected Options in a Drop Down to Populate Multiple Calculation Fields With Different Values? Image 4 Screenshot 103

     

    4. Create three (3) additional conditions like the above but change the "A" to "B", "C" and "D" respectively

    5. Four similar conditions would need to be created for Calc3. The only difference is that the expression would contain the letter "B" instead of "A":

    How Do I Get Selected Options in a Drop Down to Populate Multiple Calculation Fields With Different Values? Image 5 Screenshot 114


    When you're done there should be eight (8) conditions in total:

    How Do I Get Selected Options in a Drop Down to Populate Multiple Calculation Fields With Different Values? Image 6 Screenshot 125


    That's pretty much it but if you need further assistance with this, please inform us.


    Thanks

  • abajan Jotform Support
    Replied on March 25, 2015 at 10:34 AM

    Incidentally, in case you're wondering about the other method, it's this: Don't put any calculation values in the drop down and then create twelve (12) conditions, similar to the following:

    How Do I Get Selected Options in a Drop Down to Populate Multiple Calculation Fields With Different Values? Image 1 Screenshot 20

    But that would be more tedious.

    By the way, please feel free to clone the demo if anything above is unclear.

    Cheers

  • raminal69
    Replied on January 27, 2016 at 5:36 PM

    I cannot find the option " Conditions wizard " in calculation field. How can i do it ? Thx

  • Chriistian Jotform Support
    Replied on January 27, 2016 at 10:54 PM

    You can find the Conditions Wizard in the calculation field by clicking on the Wand Icon seen in the screenshot below:

    How Do I Get Selected Options in a Drop Down to Populate Multiple Calculation Fields With Different Values? Image 1 Screenshot 30

    How Do I Get Selected Options in a Drop Down to Populate Multiple Calculation Fields With Different Values? Image 2 Screenshot 41

  • raminal69
    Replied on January 28, 2016 at 5:30 AM

    You have sent me screenshots for "calculation wizard", bit in previous posts in actual thread your colleagues put screeshots with "conditions wizard" . I mean  " conditions wizard" not " calculation wizard" . Thx in advance.

  • victor
    Replied on January 28, 2016 at 9:12 AM

    In my colleagues sample, Abajan uses 3 calculation fields to display the result of what is selected in the dropdown. It is not possible to populate a dropdown with values, depending on what is selected. If this is not what you are looking for, you may always view the DYNAMIC DROPDOWN widget. This will enable to create various dropdown and only display the the corresponding one, depending on the selection. It does not calculate values, but if the results are not dynamic this might be useful.

    How Do I Get Selected Options in a Drop Down to Populate Multiple Calculation Fields With Different Values? Image 1 Screenshot 20

  • raminal69
    Replied on January 28, 2016 at 11:27 AM

    Ok, I see. Thx. But how one can assign to different countries the corresponding shipping zones for various carriers ? By defaulut, "dropdown" field with "special options " - countries allows assigning only 1 set ot values. For my case,  the values of countries will be shipping zones for different carriers. Every carrier has separate shipping zones numbering. So what i mean, the customer select the country from dropdown and  3 additional calculation fields should be enabled/ showed with separate shipping zones number (tarifs) for corresponfing carriers predefined values set.   

  • raminal69
    Replied on January 28, 2016 at 11:28 AM

    Or, I 'd refolmulate the problem. Is it possible to simultaneously select the same option (country) from  a few different dropdowns ?

    I mean that every dropdown with "Countries" option will be manually prepopulated by corresponding set of values (shipping zones for carriers). Customer select on web form the country from dropdown and for example 3 calculation fields will be showed - for TNT, UPS and DHL.

    Or may be there is any "trigger field"  one can use for that ?  Thx   

  • victor
    Replied on January 28, 2016 at 1:04 PM

    If I understand you correctly, you have added a address field in your form. Depending on the country the users selects, you would like to show the different carriers that country has.

    I may be getting ahead of myself, but I created a small form in witch a users selects a country and a dropdown appears will all the carriers. Once the users selects a carrier, the total will automatically be updated.

    How Do I Get Selected Options in a Drop Down to Populate Multiple Calculation Fields With Different Values? Image 1 Screenshot 20

    You may clone the form and review it as you like.

    https://form.jotformz.com/60275144989668

    Please let us know if this helps.

  • raminal69
    Replied on January 28, 2016 at 2:14 PM

    Thank you Viktor. The problem is that the output calculations filed should be calculated simultaneously for selected country. The all set of freight  prices should be showed simultaneously, so the customer can visually compare freight . Your sample form assume that I have to create about 200 x 5 x 4= 4000 conditions ( for every country multiply weight intervals x multiply number of carriers).  The problem is that when i am going to create more as 5 conditions for dropdown with countries - the form freezes. For that i opened the another ticket whicht was forwarded to developer. http://www.jotform.com/answers/757875-Conditional-Logic-Multiple-IF-statements-on-Address-field-causes-the-form-builder-to-lag-freeze#7

     

     

  • victor
    Replied on January 28, 2016 at 3:55 PM

    You do not really require to create 4000 conditions. You just need to create a single condition for each country. This is not a very complicated condition like you have in your other thread. This will only verify one field and not more. 

    How Do I Get Selected Options in a Drop Down to Populate Multiple Calculation Fields With Different Values? Image 1 Screenshot 40

    This condition will display the corresponding radio button will all the carriers. and also display the total (if required). In each radio button I have again placed a calculation value that can be jused to calculate the require total.

    How Do I Get Selected Options in a Drop Down to Populate Multiple Calculation Fields With Different Values? Image 2 Screenshot 51

    I have adjusted the form again with these changes. You may use the same link to clone the form.

    https://form.jotformz.com/60275144989668

    Please let us know if this helps.

    How Do I Get Selected Options in a Drop Down to Populate Multiple Calculation Fields With Different Values? Image 3 Screenshot 62

  • jbeltran
    Replied on March 19, 2017 at 1:59 PM

    Can this form that you are referring to: http://form.jotformpro.com/form/50834042022946 be done with 3 inputs? In other words, 3 different drop downs and depending on the selections the 3 outputs are calculated? (I already have the calculations for each possible scenario)?

     

    Thank you so much