header1   header
header
header Register : : Login header
header
connector   connector
menuleft menuright
submenu   submenu
left
sharepoint list items only returns "title"
Last Post 30 Jun 2010 07:10 AM by steve. 0 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
steveUser is Offline
New Member
New Member
Posts:1
Avatar

--
30 Jun 2010 07:10 AM
    Hello all,
    I am trying to itterate through data values in specific columns in a sharepoint doc library.

    using the code below I can return the Title fine, however I canno retrieve data for any other user column. Can someone help me understand this behavior and point me to a solution?


    $docliburl=”My correct url"
    $relweburl=”/correct directory”
    [System.Reflection.Assembly]::LoadWithPartialName(”Microsoft.SharePoint”) > $null
    $site=new-object Microsoft.SharePoint.SPSite($docliburl)
    $web=$site.openweb($relweburl)
    $folder=$web.getfolder($docliburl)
    $list=$web.lists[$folder.ContainingDocumentLibrary]
    foreach($list.Items in $list)
    {
    $list.Items | select Title,column1,column2
    }
    $web.Dispose()
    $site.Dispose()

    Thanks in advance.

    Steven
    You are not authorized to post a reply.


    Active Forums 4.3
    right
    footer   footer
    footer Sponsored by Quest Software • SAPIEN Technologies • Compellent • Microsoft Windows Server 2008 R2 footer
    footer   footer