I'm using InfoPath and SP 2010. I'm using calculated fields which works well, but I wonder if there is a way to copy calculated field value to standard list field when form is submitted ?

  • 1
    Hi Maciej, are the calculated fields in the sharepoint list or in the Infopath form?
    – GenePA
    Nov 19 '12 at 15:15

Calculated value in Infopath is control, OOTB (out of the box), i.e. just visual container. Controls can be bound or not to data fields (and vice versa, it is possible to have data fields without there visual rendering). OOTB, when you drag'n'drop Calculated value control from ribbon in Infopath Designer (IPD), it is not bound to doesn't create a data source/field bound to control.

  • Update: In contrast, most (if not all) other controls when drag'n'dropped from ribbon of IPD are simultaneously creating bound to them data field.

As such, it is impossible to copy (or submit) controls to Sharepoint, only data in data fields. One creates data fields without controls in Fields pane (former Data Source pane in IP 2007) and then can bind or not them to controls.
OOTB (update: see Update3 below), there are no data field of type "calculated value" in Infopath though you can create a data field, then use rules or default value to calculate there whatever value you want.

It is also not clear what you mean under "standard list field"

  • Update:
    or where your calculated values work well - in Infopath form or in Sharepoint.
    Further on, I assumed that in Infopath form. It is the easiest way to put fields from Infopath form into Sharepoint.
    Other way around, putting them first in Sharepoint, in most cases are redundant to the steps to be made in Infoapth Designer and frequently leading to type mismatches between Sharepoint and Infopath.

If you meant under it a sharepoint list then Infopath Sharepoint List Form data fields are directly (and rigidly) linked to its sharepoint list fields.
If you meant under it a sharepoint library then you should promote a data field during publishing your Infopath template in order to have it copied to a field in sharepoint library.

enter image description here

I've just checked that if to create a calculated column in a sharepoint list first, then creating its Sharepoint List Form by pressing Customize Form button (in Sharepoint Designer or in a browser), the corresponding to it field is created in Infopath form template as a data field without any corresponding control. So, it requires creating a corresponding control (by drag'n'dropping from or right-clicking and choosing options in Fields pane) to be visible to users.

This is funny. Unmodifiable CalculatedType appeared for a data field through creating a calculated column in sharepoint list (from sharepoint side), but it is impossible to attribute such type directly from Infopath.

enter image description here

Update4 (in response to comments): I wanted (but didn't) to reply to your first comment that you probably misunderstood something in my answer. It is better if a person comes to conclusions having poked himself. Then, I had a vague vanity that your happiness will somehow pass through unbroken.

First, do not use calculated value control for your purposes - its data source is expression but not data field. It is data fields that are linked to sharepoint list and possible to submit to it.
In Infopath 2007, 2010's calculated value control had more fortunate and less misleading name - Expression Box.

Second, if you decided to use Infopath, then try hard to use its OOTB features (behavior) without overriding them, they will be pain in the ass if you override them.

  • Thank you! I didnt realize I can bind calculated field to existing list field!
    – Maciej
    Nov 20 '12 at 3:45
  • RE: "drag'n'dropped from ribbon of IPD are simultaneously creating bound to them data field" - this is actually what I expected here - that's why I even didnt try to bind it 'manually' :)
    – Maciej
    Nov 20 '12 at 18:52
  • 1
    Oh seems it was too early happines... I thought I can setup math rule in calc value control (in IP) than bind such to existing field from SP list (eg TOTAL_PRICE) and than calculate value control will submit data back to SP. Tunred out that when I bind it my rule is beeing replaced by bound field reference..... :(
    – Maciej
    Nov 20 '12 at 23:14
  • +1, see my Update4. I did not reply to your 1st comment NOT because I did not read it or did not care. I just felt a sorrow that I couldn't explain that calculated value control in Infopath 2010 is former Expression Box control in 2007 with less misleading notation. And one has either expression (based on data values in "other" data fields) or data field as data source, not both Nov 21 '12 at 4:33
  • Saga continued but my point is that there is no necessity to create sharepoint calcilated columns. This all being done more easily directly in Infopath designer without meddling in the "help" intermediary engagement from the sharepoint side Apr 4 '13 at 6:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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