Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11508

Programatically modify the formula for a calculated field in SharePoint 2010

$
0
0

I have a SharePoint list containing multiple fields of mileage data and one calculated field to total all of the miles.  I programmatically add new number fields as necessary and need to modify the calculated field to include the newly added number field.  I've tried the following code to reference the calculated field but receive an error that the field does not exist (I have confirmed the field name is correct):

SPFieldCalculatedtotalMiles = hikingList.Fields.GetFieldByInternalName("Miles Earned")asSPFieldCalculated;

Any ideas on what I am missing?

Thanks.

Eric



Viewing all articles
Browse latest Browse all 11508

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>