I am not a great story teller, but I think me telling a story will let you guys understand where my error is coming from. I am somewhat of a novice at InfoPath.
I have two fields. Both of these fields are pulling from a support list on SharePoint. When an item is picked from a drop down to identify the unit, another field looks at a column associated with that info and provides the number of beds on that unit.
I have a few other fields:
Gains - number of patients admitted to that unit
Losses - number of patients discharged from that unit
Previously Reported - Number of patients on the previous day
Remaining - (Previously reported + gains) - Losses
Operating Beds - The bed count that is given from the ward
Unoccupied Beds - Operating Beds - Remaining
Overcapacity Beds - if patients admitted to a unit exceeds the operating bed count, this would give a positive number of how many beds over.
I have some rules and formulas for these fields:
Unoccupied Beds has a rule that says if Number of Unoccupied beds < 0; set that field to 0 so it doesn't show a negative number.
There is a unoccupied bed rule to get the negative number that uses the same formula: Operating Beds - Remaining
Overcapacity beds has a rule of Unoccupied Bed rule < 0, translate that number to a positive number. There is a function on the field property that uses the same formula. There is another rule that says if that field was >= 0 then set the Overcapacity field to 0.
I am getting this error An error occurred in the form's rules or code. The number of rule actions or the number of calls to the OnAfterChange event for a single update in the data exceeded the maximum limit.
The rules or code may be causing an infinite loop. To prevent this, ensure that the rule action or event handler does not update the data which causes the same rule action or event handler to execute.
Then it tells me that some rules were not applied. Operation Aborted.