I created a column for a number and I selected default value and populated the box with 180. I does not fill the field with the default. How do I autofill?
2 Answers
First, are you doing this through the UI or through code? If code, can you please provide your code so we can see why it might not be working?
Second, when creating a new item in the list, it will prepopulate the field value with 180. Are you not seeing that or are you expecting it to show 180 for items that are already in the list? I have tested this in the UI by creating a number field with 180 as the default and creating a new list item. The 180 value is present in the field.
If you are expecting the default value to be there for existing items, that is not the case. You'd need to have a script iterate through all the existing list items to update each item for it to reflect the default value.
- Shouldn't it be a comment rather than an answer ?Arsalan Adam Khatri– Arsalan Adam Khatri2014-04-29 21:38:26 +00:00Commented Apr 29, 2014 at 21:38
- revised to be more appropriate.Eric Alexander– Eric Alexander2014-04-29 21:55:06 +00:00Commented Apr 29, 2014 at 21:55
If this column belongs to a content type, then that content type will need to be the default content type for list/library, otherwise the default values won't work. Seems buggy, but it is what it is.