Jotform does not like circular references

  • Profile Image
    pjm.mcnab
    Asked on July 29, 2019 at 07:38 PM

    Jotform does not like circular references



    This is a re-post of a comment on How to Insert Text or Calculation into a Field Using Conditional Logic

  • Profile Image
    gerardw
    Answered on July 29, 2019 at 08:21 PM

    Your query is not clear. Kindly provide additional info regarding your question so that we could assist you accordingly.

  • Profile Image
    pjm.mcnab
    Answered on July 29, 2019 at 09:13 PM

    Hi Gerardw,

    I am extremely impressed with the power and simplicity of Jotform.  I just made a comment, not a query.  But here is the background:

    I am still learning the Jotform way and at that time was trying to work out how to add to a total based on user choices.  The unknown was whether Jotform evaluated all conditions with every pass and what triggered them.  

    I wrote some logic to calculate a total value from a number of conditional clauses.  I wanted to update the total based on whether a number of fields were or were not filled.  I made the mistake of saying something like Insert TOTAL+1 into TOTAL.  JotForm accepted this, but went into an infinite loop during preview. The total should not have been greater than 4 but I remember seeing 88 at one point before the cursor flicker took over.

    I was able to close the form and there was no lasting impact on my form.  I just took another path to do the job, using a few intermediate hidden variables, so that each 'filled' field updated a corresponding number.  Then I added these numbers.

    I think JotForm should recognise recursive calculations and throw up an error message while the statement is being written.


    Cheers, P

  • Profile Image
    gerardw
    Answered on July 29, 2019 at 09:26 PM

    Thank you for the feedback and we are glad that you are finding JotForm easy to use.

    I think you were working on this form, right? - "https://www.jotform.com/61906789189980".

    If you can let us know the conditions and calculations that you may have used, we could review and provide you a suitable solution or workaround. I can see that currently in this form, a similar condition (as you have stated above) is not present.

    There are options to limit the total number in a field. We also have Form Warning options to add error messages, but we will need to see the actual calculation and condition setup that you may have added.

    Thanks!

  • Profile Image
    pjm.mcnab
    Answered on July 30, 2019 at 06:43 AM
    Thanks for looking at this form. But as you say, that condition is no
    longer there. I fixed the problem with the form myself.
    My concern is that JotForm did not identify the error.
    Cheers, Peter
    ...
  • Profile Image
    gerardw
    Answered on July 30, 2019 at 07:41 AM

    Hello Peter,

    Thanks for the information. I tried to replicate a similar situation from my end. I created a simple form as shown below with a related condition. I think you were trying to perform this same calculation from your end, right?

    15644864293007_8.png

    15644864503007_9.png

    In this case, I was able to receive the same error as you have stated. This is because, the condition itself is wrong and that it why the calculation is showing random infinite numbers.

    I'm afraid in such a situation an automatic error message won't be displayed and you will need to rectify the condition accordingly as the logic itself was incorrect. The system does not automatically detect incorrect conditions and they will need to be rectified manually.

    Hope this clarifies your query.

    Thanks!