开发者

How to add default values in existing list items?

I have a custom list, whic开发者_开发技巧h have some items in it. I dynamically add a new field with defined DefaultValue property (SPField.DefaultValue). But this default value applies only in new items. The existing items remain this field empty. Please, tell me, is there any decision to update existing items with default field value except of writing the code to loop each of them? I am using Sharepoint Server 2007. I'll appreciate any help. Thank you.


Unfortunately, I am not aware of any way to populate those values without touching each item. If you have access to the SharePoint server and can run some code to fix the values that may be the easiest way.

Alternatively, you can create a DataGrid View using the web interface and filter it to the items that did not receive the new default value. You can then easily populate that entire column with your desired value: insert the value in the first cell, then drag it down through the rest of the column similar to how you can in Excel).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜