Show/Hide Toolbars

Therefore Web API Programming Interface 1.0

Create or Update Index Data

When you update or create a document or case, you can specify values for index data fields.

 

Create operations are:

CreateDocument;

CreateCase;

SubmitCreateDocumentBatch.

When you create a document or case, you have to specify fields you want to set. Other fields not mentioned in your request will be updated to its default or dependent values, if applicable. Otherwise they are left empty.

 

Update operations are:

UpdateDocument;

SaveCaseIndexData;

SubmitUpdateDocumentBatch;

SaveDocumentIndexData;

FillDependentFields.

When you update a document or case, you have to specify the fields you want to set to specific values for. Dependent fields will be updated automatically. You cannot set the field value to it's default during an update.

 

note

When updating the index data you also have to specify the LastChangeTime parameter value in the request. You can get this value executing CreateDocument, CreateCase, UpdateDocument, etc. Usage of LastChangeTime helps to avoid conflicting changes of the document or case index data. LastChangeTime is processed as a UTC date and time.

 

info

To clear the value of the field, specify null value for the DataValue member.
Example: SingleKeywordData {FieldNo = 456, DataValue = null}

If you take a look at the CreateDocument operation request parameters, you can find a list of WSIndexDataItem elements (see table below).  You can specify the value of the index data field within the WSIndexDataItem element of the request, in order to set or update the value. For example, if you want to set the value of the logical field with number 123 to true, you should use the element LogicalIndexData {FieldNo = 123, DataValue = true}.  Use the appropriate element from the list (DateIndexData, MultyKeywordData, TableIndexData, etc.) for the other field types. For more details see Web API SDK Samples.

 

Element Name

Element Type

≡ WSIndexDataItem

 

  â–¡ DateIndexData

 

     â–  FieldNo

xs:int

     â–¡ DataValue

xs:dateTime

  â–¡ IntIndexData

 

     â–  FieldNo

xs:int

     â–¡ DataValue

xs:int

  â–¡ LogicalIndexData

 

     â–  FieldNo

xs:int

     â–¡ DataValue

xs:boolean

  â–¡ MoneyIndexData

 

     â–  FieldNo

xs:int

     â–¡ DataValue

xs:double

  â–¡ MultipleKeywordData

 

     â–  FieldNo

xs:int

     â–¡ DataValue

 

        ≡ Keyword

xs:string

  â–¡ SingleKeywordData

 

     â–  FieldNo

xs:int

     â–¡ DataValue

xs:string

  â–¡ StringIndexData

 

     â–  FieldNo

xs:int

     â–¡ DataValue

xs:string

  â–¡ TableIndexData

 

     â–  FieldNo

xs:int

     â–¡ DataValue

…

 

 

Working with Table Index Data Fields

You should use the TableIndexData element to work with tables (see table below). By using this element you can specify values for fields in rows.

 

One of these elements is RowNo (starts at 0). We now take a look at how this element can be used for different operations:

oWhen you create a document or case, the RowNo value is not taken into account at all. The value will be ignored.

oWhen you update a document or case there are few scenarios:

to update an existing table row you should specify the RowNo and DataRowItems with the field values for updated fields;

to add a new row you have to set the RowNo to the null value and the DataRowItems with the field values for a new row;

to remove an existing row you should specify the RowNo and set the DataRowItems element to the null value.

 

 

Element Name

Element Type

â–¡ TableIndexData

 

â–  FieldNo

xs:int

â–¡ DataValue

 

≡ WSTableFieldDataRow

 

â–¡ DataRowItems

 

≡ WSTableFieldDataRowItem

 

â–¡ DateIndexData

 

â–  FieldNo

xs:int

â–¡ DataValue

xs:dateTime

â–¡ IntIndexData

 

â–  FieldNo

xs:int

â–¡ DataValue

xs:int

â–¡ LogicalIndexData

 

â–  FieldNo

xs:int

â–¡ DataValue

xs:boolean

â–¡ MoneyIndexData

 

â–  FieldNo

xs:int

â–¡ DataValue

xs:double

â–¡ SingleKeywordData

 

â–  FieldNo

xs:int

â–¡ DataValue

xs:string

â–¡ StringIndexData

 

â–  FieldNo

xs:int

â–¡ DataValue

xs:string

â–¡ RowNo

xs:int

 

 

Working with Date index Data Field

The Thereforeâ„¢ Server supports Date fields for the index data. This means that only date information can be stored without any time fraction. The Thereforeâ„¢ Web API uses the DateTime type to represent Thereforeâ„¢ Date fields (the pure date type is not supported by the used technology).

 

The DateTime type in Microsoft .Net Framework has Kind property. The value of this property indicates whether the time represented by the instance is based on the local time, the Coordinated Universal Time (UTC), or neither. Option "neither" should be used for dates in Thereforeâ„¢ (see more details below).

 

note

To avoid time zone conversion issues (when date can be unexpectedly changed +/- one day if the client and the server are in different timezones) you should send the dates without the timezone information:

For .Net use - DateTime.Kind == DateTimeKind.Unspecified.
   You can convert local time to "unspecified" this way:
  DateTime noTimeZoneDate = DateTime.SpecifyKind(localDate, DateTimeKind.Unspecified);

For XML value the Date time element value should be like this: 2001-03-02T00:00:00.

For other languages please refer to the corresponding documentation.

 


© 2023 Therefore Corporation, all rights reserved.