Activities field element 

Lists the field element types that can appear in an Atom entry document produced by or sent to the API.

A single Activity entry can contain one or more fields of each type.

The <snx:field> element that defines a field in an Activity entry is in the http://www.ibm.com/xmlns/prod/sn namespace.

Table 1. snx:field attributes

Attribute How treated on input Description
fid Required when updating, not posting. Unique identifier of the field. This identifier is assigned by Activities. You do not need to provide a value for this attribute if you are creating a field, but specify a value for this field if you are updating, replacing, or deleting a field.
hidden Optional If present, specifies that the field is hidden.
name Required This name is displayed in the entry as the field label, similar to the Title or Description field labels that are included in the entry by default.
position Required Position of the field in the containing Activity entry's array of fields. Use numbers separated by large increments to allow for repositioning. For example, use 1000, 2000, 3000, and so on.
type Required Defines the field type. The following values are supported:

  • date

  • file

  • link

  • person

  • text

Example: The following sample is the content of a standard entry that contains fields of different types.

...
 <content type="html">Don Quixote begins his adventure to save Dulcinea del 
  Toboso from the evil windmills.</content>
 <snx:field 
  name="Link Field"  
  fid="B2CG09219C73BB73162A79E0A9951B000007" 
  position="1000" 
  type="link" >
   <link href="http://www.ibm.com" title="IBM" />
 </snx:field>
 <snx:field 
  name="Text Field"  
  fid="D7AG09219C73BB73162A79E0A9951B000009" 
  position="2000" type="text" >
   <summary type="text/plain">Don Quixote&#039;s Adventure</summary>
 </snx:field>
 <snx:field 
  name="Date Field"  
  fid="DC5G09219C73BB73162A79E0A9951B00000B" 
  position="4000" 
  type="date" >
   2008-06-12T04:00:00Z
 </snx:field>
 <snx:field 
  name="File Field"  
  fid="6B1G09219C73FC893188AEDCA47086000002" 
  position="5000" type="file" >
   <link 
    rel="enclosure" 
    type="image/jpeg" 
    href="http://localhost:8080/oa.web.coreui/service/download/
     57EG09219C73DFD08F30C15F32D032000006/Winter.jpg" 
    size="105542"/>
   <link 
    rel="edit-media" 
    type="image/jpeg" 
    href="http://localhost:8080/oa.web.coreui/service/download/
     57EG09219C73DFD08F30C15F32D032000006/Winter.jpg" 
    size="105542"/>
 </snx:field>
  <snx:field 
   name="Person Field"  
   fid="FE7G09219C73DFD08F30C15F32D032000002" 
   position="8000" 
   type="person" >
    <name>carl_smith@example.com</name>
    <snx:userid>937965j0-4f0c-1028-5a06-db07163b51b2</snx:userid>
    <email>carl_smith@example.com</email>
 </snx:field>

Note: If you access this same version 2.0 entry from a version 1.0.x feed, the field information is included in the <content> element. For example:

<content 
 type="html">
  Link Field: &lt;a href=&#034;http://www.ibm.com&#034;&gt;IBM&lt;/a&gt;&lt;
   BR&gt;Text Field: Don Quixote&#039;s 
  Adventure&lt;BR&gt;Date Field: Thu Jun 12 00:00:00 EDT 2008&lt;BR&gt;
   File Field: &lt;a href=&#034;http://localhost:
  8080/oa.web.coreui/service/download/57EG09219C73DFD08F30C15F32D032000006/
   Winter.jpg&#034;&gt;Winter.jpg
  &lt;/a&gt;&lt;BR&gt;Person Field: carl_smith@example.com&lt;BR&gt;&lt;BR&gt;
   Don Quixote begins his adventure to save 
  Dulcinea del Toboso from the evil windmills.</content>

For more information about each type of field element, see the field type topics that follow.


Parent topic

Activities API


   

 

});