I'm having an issue displaying data on an InfoPath 2013 form (hosted in a SharePoint 2013 library) which uses external data coming from a SharePoint list on the same site.
I'm using external data because it happens to be contract rates (which tend to change), and the data is used all over the form. I've created input fields, fields that multiply the corresponding input field by the rate (external data), and fields that calculate the totals.
The issue: the InfoPath form will work perfectly when previewed, but when I publish it to the SharePoint library and view it in the browser, rates (that rely on the external data in the SharePoint list) will not calculate, just shows "NaN". Any other calculated values on the form will work properly, however. If I try filling the form out through SharePoint but using the InfoPath Form Filler, the rates display correctly. The issue only happens when filling the form out in the browser.
Here was my exact process in creating the calculated fields:
- Created field element with the Decimal (double) data type
- Added the appropriate formula in the Default Value section (includes the formulas which used the lookup data)
- Dropped the field onto the form table
- Right clicked on the field, changed type to Calculated Value
- Applied currency formatting on the field
I used this method instead of just creating Calculated Values directly, because apparently when you do that, you will get lots of errors when publishing to SharePoint.
I have tried:
Deleting and republishing the form library.
Bypassing the calculated field method altogether and just dragged the field containing the lookup directly on the form, (displays no value on the web form).
Turning off the option to store a copy of the external data in the form template.
Converted the external data format to legacy mode and back to the current mode.
I am somewhat new to InfoPath. Maybe I'm doing something wrong here? Will much appreciate any insight to this issue.