• Resolved loppisinorge

    (@loppisinorge)


    Hi, my form is acting up.
    It is a Norwegian GDP calculator website.

    When i punch in 5 “studiepoeng” and Choose A in the first row (as shown in the linke below).
    I get 5 “totale studiepoeng” and “snittkarakteren din” is 5 (A). Which is correct.

    But when i enter 5 “studiepoeng” in the second row, the “snittkarakteren din”, goes down to 2,5 (C). but the second row “karakter” is blank. Why does it show 2,5? When really the second row should not impact the “snittkarakteren” din.

    Heres a Link showing whats wrong:
    https://ibb.co/B6LYKgv

    Heres a link showing how it should look like:
    https://ibb.co/3cGWy29


    So summed up:
    – when the students first enter their ECTS (studiepoeng) and than their grade in row 1 everything is ok. But immediately after they enter their second ECTS, WITHOUT entering their grade, the total GDP becomes wrong.

    Is their something i am doing wrong?

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @loppisinorge

    The issue is not caused by the plugin but by your form implementation. You have the equation fieldname11/fieldname1 where the equation of fieldname11 is the sum of the operations fieldname2*fieldname3+fieldname4*fieldname7+…. but the equation of fieldname1 is fieldname2+fieldname4+…

    But when the fieldname3, fieldname7, … choice selected is “Velg karakter” the value of fieldname2*fieldname3 (or the pair of fields that correspond) is zero. However, it does not occur in the fieldname1 sum.

    Basically, you are calculating:

    (5*5+5*0 )/(5+5) = 25/10 = 2.5

    Please note the support service does not cover implementing or debugging the users projects. If you need help implementing your project, you should contact us directly via the plugin website.

    Best regards.

    Thread Starter loppisinorge

    (@loppisinorge)

    Thanks for responding. I’ve tried a bunch of different things to fix this.
    How do i go about and fix this? Since i am failing πŸ™

    Plugin Author codepeople

    (@codepeople)

    Hello @loppisinorge

    Instead of summing fieldname2+fieldname4+… directly, you must use the IF operation to exclude from the sum those operands whose dropdown fields’ values are zero:

    fieldname2*IF(fieldname3, 1, 0)+fieldname4*IF(fieldname7, 1, 0)+….

    Best regards.

    Thread Starter loppisinorge

    (@loppisinorge)

    Thanks!
    Now everything works as it should!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Auto complete..’ is closed to new replies.