• Resolved musali

    (@musali)


    Is it possible to have a term that states that if the user selects a name in a droplist the form should execute term 1 and else execute term 2?

    For example:

    fieldname1(Dropdown)
    – New York
    – Detroit

    fieldname2(newyork)
    – 10
    fieldname3(detroit)
    – 7

    if user picks detroit in dropdown menu then go on to calculate fieldname3 else fieldname2.

    In my code i’ve written for the given example IF(fieldname1 = Detroit, fieldname3, fieldname2)

Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @musali

    In javascript, the operator for the equality is the double equal symbol == because the = symbol is used for assignment. Additionally, the textual values in the equations must be enclosed between single or double quotes. So, the correct equation would be:

    IF(fieldname1 == 'Detroit', fieldname3, fieldname2)

    Note you have other alternatives:

    * You can enter the numbers 10 and 7 as the values of the “New York” and “Detroit” choices in the fieldname1, respectively, and the equation would be:

    fieldname1

    * You can configure the fieldname2 and fieldname3 fields as dependent on the fieldname1 choices (https://cff.dwbooster.com/blog/2020/03/01/dependencies), and given that values of dependent fields are zero when they are disabled, the sum operation would not be affected by them. So, you could implement the equation as follows:

    SUM(fieldname2, fieldname3)

    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘Terms from dropdown menu’ is closed to new replies.