Sharepoint: How to get value of custom columns -


I have a list with two new custom columns in SharePoint "First Line Pass" and "Second Line Pass"

How to get the value of custom columns?

I try this method: This column type is "Person or Group" and "Allow multiple selections" is set to "Yes".

string name = item ["name"] as string; String ModifiedBy = item ["modified"] as string; String first lin epiv = = [["coming of first line"]] as string; String as string SecondLineApprovers = item ["Second Line Passwords"];

And for the first two columns, I get the correct value:

  "New text document. Txt" "1; #SHAREPOINT \\ Administrator" / Code>  

But for my new column I get

  null null  

but there are values ​​in this column! !!

User user SHAREPOINT \ user2 SHAREPOINT \ user3

and "second line pass"

"

  SHAREPOINT \ user4  

What's wrong and how do I get the value of this column?

< "post-text" itemprop = "text">

I resolve my problem.

Enter the correct SPFieldUserValueCollection and string

  SPFieldUserValueCollection FirstLineApprovers = (SPFieldUserValueCollection) item ["First line official "]; Foreach (SPFieldUserValue userValue in FirstLineApprovers) {// ...}  

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -