Tag Info

New answers tagged

1

There was not an issue with the code nor the Sharepoint edition. The issue was a somewhat scrambled list template, with multiple duplicate content types. I recreated it and everything is OK.


0

This should work for you. You have to call the .Update() on the field not on the list. public override void ItemAdded(SPItemEventProperties properties) { SPWeb myWeb = properties.Web; string projectName = properties.ListItem["Project Name"].ToString(); var customTemplate = myWeb.ListTemplates["ProjectTemplate"]; myWeb.Lists.Add(projectName ...


3

I think you should call Update on the SPField object, whereas you're calling it on the SPList item object. var projectCategoryField = myItem.Fields["Project Category"]; projectCategoryField.DefaultValue = "Test default value"; projectCategoryField.Update();


1

You can use the Fields REST API. First you would get the fields, then you could enumerate through each to get the current default values. If the user changes the default value, you could use a HTTP MERGE request to update the DefaultValue property. This could all be done with HTML JavaScript. A nice addition would be to use the ...


1

You can use PowerShell scripting for this Sample code $spWeb = Get-SPWeb http://siteurl $spList = $spWeb.GetListFromUrl("/Lists/ListName/AllItems.aspx") $spField = $spList.Fields["Field Name"] $spField.DefaultValue = "1;#Term Name" #1 is term ID $spField.Update()


0

I am assuming you created a lookup column in the Service Calls list that is called "Client" and have checked the box to also show the "Driving Distance" field in the column settings. Using a Workflow in SharePoint Designer (set to start on item creation only) you can fill in the Mileage field based on the value of your lookup column. Use the "Update field ...


0

You cannot use a Column reference from a different list for calculations. Calculated columns can only reference columns from the same list. You could use Event handlers though.



Top 50 recent answers are included