sharepoint 2010 목록 항목 필드의 내부 이름을 변경해야합니다. 어떤 이유로 인해 마이 그 레이션 소프트웨어는 2007 년에서 2010 년까지 마이 그 레이션하는 동안 마이 그 레이션 소프트웨어의 이름을 바꾸 었으며이 필드는 다른 프로세스에서 참조하기 때문에 원래 이름으로 내부 이름이 필요합니다. 이 필드는 마이그레이션 된 사이트의 200 개가 넘는 목록에 있으므로 programatically로 수행 할 수있는 방법, 즉 powershell이 필요합니다.Sharepoint 2010 목록 필드에서 internalname을 수정하는 방법
1
A
답변
0
$newInternalName = "yourInternalFieldName"
$displayName = "oldDisplayName"
$SPWebApp = Get-SPWebApplication "http://yourwebapp"
foreach (SPList $currList in $SPWebApp.Lists)
{
foreach (SPField $fld in $currList.Fields) #you could potentially use a different command here to get the field more efficiently
{
if ($fld.Name == $displayName)
{
#The boolean in the parameter list is for required/non-required field $currList.Fields.Add($newInternalName,Microsoft.SharePoint.SPFieldType.Text,$False)
foreach (SPListItem $item in $currList.Items)
{
$item[$newInternalName] = $item[$displayName]
$item[$newInternalName].Title = $displayName #I'm assuming you want to keep the display name the same
$item.Update()
}
Break #since you've already fixed the column for this list no need to keep going through the fields
# optional delete unwanted column
# $currList.Fields.Delete($displayName)
# $currList.Update()
}
}
}
내가 아는 한, 필드가 생성되면 필드의 내부 이름을 변경할 수 없습니다. 여기서 올바른 내부 이름으로 새 필드를 만들고 값을 복사합니다. PowerShell을 사용하여 서버에 액세스 할 필요가 없으므로이를 테스트 할 수 없었지만 필요한 항목과 매우 근접해야합니다. 다른 Add 함수를 사용하고 싶거나 이전 필드를 삭제하려는 경우, 처리 할 필드의 유형에 따라 비트를 약간 조정해야 할 수도 있습니다.
열거 여기에 정의 된 추가 기능의 필드의 유형을 선택합니다 : 추가 기능에 대한 오버로드의 몇 가지가 있습니다 http://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.spfieldtype(v=office.14).aspx
그렇다면 내가 당신을 위해 작동하지 않습니다 사용되는, 이 중 하나를 사용하고 싶을 수도 있습니다. http://msdn.microsoft.com/en-us/library/office/aa540133(v=office.14).aspx
관련 문제
- 1. SharePoint 2010 목록
- 2. Sharepoint 2010 + vs2010 + Sharepoint 목록 검색
- 3. SharePoint 2010 및 Editform.aspx
- 4. Sharepoint 2010 목록 작성 제한
- 5. Access 2010, SharePoint 목록, ASP
- 6. 다른 사이트 목록 (Sharepoint 2010)
- 7. Sharepoint 2010 - 인스턴스 프로젝트 목록
- 8. Sharepoint 2010 목록 사용 권한
- 9. Sharepoint 2010 Issue Tracking sharepoint 2010 달력 날짜 목록
- 10. SharePoint 2010 팜에서 SharePoint 2010 목록에 액세스하는 방법
- 11. SharePoint 2010 Foundation에 누락 된 웹 파트를 수정하는 방법
- 12. Sharepoint 양식의 조회 필드에서 행을 제외하는 방법?
- 13. SharePoint 2007/2010 배포 방법
- 14. SharePoint 2010 필터링 필터링
- 15. InfoPath 2010, SharePoint 2010
- 16. 두 목록 간의 관계? [SharePoint 2010]
- 17. Sharepoint 2010 현재 사용자를 기준으로 목록 필터링
- 18. Sharepoint 2010 목록, 계산 된 값
- 19. Sharepoint 2010 웹 파트 사용 페이지 목록
- 20. SharePoint 2010 목록 항목 사용 권한
- 21. Sharepoint 2010 드롭 다운 목록 검색
- 22. sharepoint 2010 dataformwebpart 드롭 다운 목록 필터
- 23. Sharepoint 2010 - 목록 및 경고에 대한 액세스
- 24. SharePoint 2010 Foundation 업데이트 목록 Where 절
- 25. SharePoint 2010 - 검색 구성
- 26. SharePoint 목록 웹 파트에서 "요약보기"를 수정하는 방법?
- 27. SharePoint 2010 사이트 복사
- 28. Sharepoint 2010
- 29. Sharepoint 2010
- 30. SharePoint 목록