SharePoint Web Service series: Add or update other types of items

Source: Internet
Author: User
We have discussed how to add or update a user-type item. This is because the user type is special. As the end of the SharePoint Web Service series, we will discuss how to write various other types of items.
The SDK contains the following table. Our writing relies entirely on this basis.
 

Name

Format

Attachments

System. Boolean

Boolean

System. Boolean

Calculated

N/

Choice

System. String

Computed

N/

Counter

System. int32

Crossprojectlink

System. Boolean

Currency

System. Double

Datetime

System. datetime

Gridchoice

System. String

Guid

System. guid

Integer

System. int32

Lookup

System. String

Maxitems

System. int32

Modstat

System. int32

Multichoice

System. String

Note

System. String

Number

System. Double

Recurrence

System. Boolean

Text

System. String

Threading

System. String

URL

System. String, system. String

User

System. String

This table shows the comparison between various field types in WSS and the corresponding data types in. net. Based on this, we can easily write the content in the <field> element.
For example, we want to add or update a URL-type field. You can write the field like this: <field name = "someurl"> http://www.example.com, example </field>

In this example, the someurl field of a list item is of the link type. We need to write a link to this field. The URL for this link is http://www.example.com and titled example ".
Note: For link fields, you can leave the title empty. (In this way, the system uses the address content as the title by default, which is the same as many text editors .) So the above example can also be written as follows: <field name = "someurl"> http://www.example.com, </field>

Another example is to add or update an option field. You can write the field as follows: <field name = "status"> completed </field>

The Status field in the task list is of the Option type. because it corresponds to system. String, you can directly write it like this.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.