Form Calculator to achieve conditional logic

  • Profile Image
    kentzo
    Asked on August 10, 2019 at 05:59 AM

    Can i achieve logic like this, if a field is 10, i will update another field to be 1. Basically what i want to achieve is to free customer 1 item for every 10 items they purchase. Buy every 10 item free 1 item.

    Free item = ( x Modulus 10), where X is number of item customer purchased.

    10 MOD 10 = 1

    15 MOD 10 = 1

    20 MOD 10 = 2

  • Profile Image
    gerardw
    Answered on August 10, 2019 at 07:40 AM

    You can use the Update/Calculate condition to show the Free item quantity based on the total quantity value.

    15654370361008_9.png

    Here is a sample condition:

    15654370641008_10.png

    Similarly, you can create conditions for values greater than 20, 30, etc. Here is how the form will look:

    1565437124screencast1008_1.gif

    Hope this satisfies your requirement. If not, let us know and we'll be happy to provide any further assistance.