Skip to main content
marka9619111
Known Participant
February 19, 2016
Question

multiple functions to create a sales price

  • February 19, 2016
  • 2 replies
  • 760 views

I have 2 sets of check boxes

3) check boxes for "location"

5) check boxes for "type"  associated to in each location

1) drop down menue for 10 different "size" options.

I need to calculate a final price based on the variable of all 3 values

This topic has been closed for replies.

2 replies

JR Boulay
Community Expert
Community Expert
February 19, 2016

Hi.

Checkboxes and dropdowns can have an "Export value" (Field properties : Option tab), so in the Total field you have to make the "Sum" or the "Product" (Calculation tab) of the 2 group of checkboxes and of the dropdown.

Acrobate du PDF, InDesigner et Photoshopographe
marka9619111
Known Participant
February 19, 2016

Well almost, and thanks for the response

Each check box A1, A2   -   B1, B2 etc, each have a different export value for instance

A1 would be yes / no

B1 would be 1500.00,  B2 - 1250.00 would be etc OR yes/no

the drop down would need to reflect and adjusted rate for the size (package) choice based on the selection of all 3 values

try67
Community Expert
Community Expert
February 19, 2016

You can use nested if-statements:

if (A1="Yes") {

     if (B1=="1500") {

          if (C1=="Large") {

               event.value = 100;

          } else if (C1=="Small") {

               event.value = 75;

          }

     } else if (B1=="1250") {

          // ...

     }

} else  if (A1=="No") {

     // ...
}

marka9619111
Known Participant
February 19, 2016

Maybe I shoe say....

If they select check box A1, A2 or A3

and select check box B1, B2, B3 etc

then the values selected in the drop down (C 1-10) list values change accordingly to a new rate