I had assistance from QDabra staff yesterday in setting up a form that calculated the difference in value from a meter reading entered today and the reading from yesterday. The solution pulled in a secondary data source, and set a rule to run after todays meter reading was entered in the form. The rule checked the last record entered in the sharepoint list (using Max(ID)) and calcuated the value to a field in the primary data source
After meeting with the departments staff, I found out the value needs to be set on the last record entered of the day before. So I need to set the value to the last record in the secondary data source, not the primary.
For example:
| Date |
Meter Reading |
Water Treated |
| 9/10/2013 |
259,167 |
754 |
| 9/11/2013 |
259,921 |
748 |
| 9/12/2013 |
260,669 |
9/13 meter reading value minus 9/12 meter reading value |
| 9/13/2013 |
261,250 |
to be left blank during form entry |
What would be the best way to go after this? I tried setting the rule to update the secondary dataset, however no filter could be applied. I created a Form Load rule to filter the table to the current record, however when I try to set the field, the value shows in the form, but not in the list after the form is submitted.
Using a sharepoint list - infopath form on Sharepoint 2010
Any suggestions?
Thanks in advance,
Keith