SharePoint UserData和;返回数据中的#语法

Bud*_*Joe 2 sharepoint web-services sharepoint-2007 user-data sharepoint-list

SharePoint专家是否可以向我解释GetListItems()调用Lists Web服务返回的数据中的#?

我想我明白他们在这里做了什么.;#几乎就像是用于发表评论的语法......或者更好,包括实际数据(字符串)而不仅仅是ID.这样你就可以使用它们,但它们很好地配对在同一列中.

我离开基地了吗?我只是无法弄清楚使用方式略有不同.例如

I have a list with:    
ows_Author  
658;#Tyndall, Bruno    
*in this case the 658 seems to be an ID for me in a users table somewhere*

ows_CreatedDate (note: a custom field. not ows_Created)    
571;#2009-08-31 23:41:58    
*in this case the 571 seems to be an ID of the row I'm already in. Why the repetition?*   

任何人都可以在这方面阐明SharePoint的这一方面吗?

dah*_*byk 8

该字符串;#用作SharePoint的查找字段(包括用户字段)的分隔符.使用对象模型时,可以使用SPFieldLookupValueSPFieldUserValue将分隔的字符串转换为强类型对象.但是,在使用Web服务时,我相信您需要自己解析字符串.

您是正确的,第一部分是整数ID:站点用户列表中的ID,或查找列表中相应项的ID.第二部分是查阅列的用户名或值.


尼古拉斯正确地指出,这个分隔符也用于其他复合字段值,包括......

  • SPFieldLookupValueCollection
  • SPFieldMultiColumnValue
  • SPFieldMultiChoiceValue
  • SPFieldUserValueCollection