Using Tasks with API

Follow

If you need to use tasks with API or Document Editor, you need to make them linkable, what means, that you have give external ID value for every field. External ID is unique text, what identifies certain text field.

For document editor, it's recommended to use Latin standard alphabet, letters a-z, A-Z and numbers 0-9. With Unicode letters like õ, ß, æ etc, linking does not work.

Configuring

Task types

Every task type has External ID field. Fill it to be able to refer to data and forms under that task type.

tasks_types_setting_externalid.png

Forms

Forms and their fields both have externalId properties. You need to fill them with unique texts.

tasks_forms_externalid.png

Using

Document editor

Fields are referred like this:

{formsData::Installation::fields::notes}

Here, Installation is form name, and notes form field.

API

With Api/Tasks/addXml/updateXml, you can fill task forms with following syntax:

<forms>
  <form key="Installation">
    <fields>
      <field key="notes">GPS tracker under armature in right corner</field>
      <field key="signer">Roela Juss</field>
    </fields>
  </form>
</forms>

If you want to link to task type, use ExternalId in <type> element:

<task>
<name>testing</name>
<timestamp>2020-03-20 15:31</timestamp>
<type>installation</type>
</task>

Note that forms and type elements are supported only with parameter version=2.

Was this article helpful?
0 out of 0 found this helpful