In my InfoPath 2007 form, the default value for one of my textboxes displays the result of a calculation (the sum of 4 fields substracted from the total of another field). In the form, everything works as designed. At the end of the calculation, the result shows what a person owes with respect to certain fees. Since this is a negative number, we display it in parenthesis.
I've attached a SharePoint Designer custom workflow to the form library. I've included this calculated field in the body of the email that is sent to the individual informing this person of the amount owed. This is where the trouble occurs. For example, a typical calculation results in the form amount owed field displaying (500)--i.e., the individual owes $500. However, in the email message, this same field displays as -1500. I found a way to get rid of the minus sign in front of the number; however, I'm still confused as to why the field is displaying a completely different number.
Here's how the the calculation works. I have a totalCost field which displays the sum of four fields: fieldA+fieldB+fieldC+fieldD=totalCost. I then use the totalCost field in the above-mentioned calculated field:
fieldE+fieldF+fieldG+fieldH-totalCost=[this number is displayed as the calculated field's default value]. As I said, the calculation works as designed in the form. However, things go awry in the workflow email message.
Any thoughts?
Thanks.