Can I use the same field as a part of the same calculation within a condition?

  • Profile Image
    Asked on December 09, 2017 at 05:43 PM
    Additionally, I am having trouble increment a field up multiple times.  I seem to get an endless loop/freeze when I try to use conditional logic like: Filed A +1 = Field A.  I see that seems to be an issue ( ).  Is this resolved?
  • Profile Image
    Answered on December 09, 2017 at 06:28 PM

    The thread you posted was not an issue that needs to be resolved per se. It was a query/question by someone who also managed to find a solution for his problem himself.

    From how he phrased it, he managed to get around the idea by using the Form Calculation Widget. Since the post was a bit old, we can't tell for sure if he's requirement is the same as yours.

    From how I understood it, here's what you want to happen:

    IF something is TRUE, THEN add 1 to FIELD A and post that result to that same FIELD A

    This would indeed cause a loop in the condition since you're using the same field as both the trigger the result.

    One way around this is to use CALCULATION VALUES if you will be triggering the increment through a field that supports calculation values.

    Calculation Values can be assigned to the following fields:

    🔘 Dropdowns

    🔘 Single Choice (radio buttons)

    🔘 Multiple Choice (checkboxes)

    Related guide: How-to-Assign-Calculation-Value

    The idea is to assign a value of 1 to specific fields which in turn will be used in conjunction with a Form Calculation Widget. To give a rough example, have a look at this form:

    That form doesn't use conditions - It only uses the assigned calculation values for each of those 3 checkboxes. Then the Form Calculation Widget simply tallies the total.