1

I have a form that calculates the difference between two date fields then uses that difference to limit it to two weeks. The rules work fine when previewed in the filler. The difference field is recalculated each time I change one of the dates and I get a single integer. I got the rules from here. When I publish it and try it in the browser, I get:

Default values, rules or code may be running in an infinite loop. To prevent this, ensure that the default value, rule action or event handler does not update the data which causes the same rule action or event handler to execute. Correlation ID:1951cc08-e673-4f9c-b8d7-a8ced79b0f52

I put a text box in the form to test it and realized that when run in the browswer the date difference field was being populated with "-8191.75;0.125" every time I put in a date.

Any idea as to why there would be such a difference between the preview in the client and the browser?

2 Answers 2

1

Where is the result of the calculation stored? If it's stored back in the same field that the rule is running on, it will attempt to calculate the new value and store it back in the same field. This would be, as the error explains, an infinite loop. If this is the case, store the result in a different field with no rules applied.

I may be misunderstanding the question but that's what I got out of it.

2
  • Most of the calculation happens on the field that holds the date difference. I'll probably end up reworking it with more fields but I'd really like to know why it works flawlessly in the filler preview but bombs in the browser.
    – samauger
    Jan 12, 2012 at 14:19
  • I didn't end up solving this, I resorted to code and admin-approving it. If anyone has any ideas I'd still love to hear them :)
    – samauger
    Apr 16, 2012 at 20:23
0

While there may be a way to solve this without code, I ended up using VB and publishing the form as admin approved. Coding date calculations is much easier than trying to turn them into rules :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.