<updatefields>

The <updatefields> tag is an auto insert tag that allows you to automatically populate a board field when an existing record is updated. It can be populated with data from one or more fields. For example, you can implement a running history of comments or status changes.

  • The tag is only used in input views.

  • There can only be one <updatefields> tag in an input view.

  • The tag must reside within a standard HTML <form> tag.

  • It can only have <field> tags within it.

<updatefields> attributes
Attribute Allowed Values Requirements Description
name CDATA Required Name of the field that will be populated.
convertToUtc (false|true)
false
Optional To convert the local date to the UTC time zone before it is saved to the database, set this attribute to true when <field> value contains the local date.

Example

Copy Code
<form>
<updatefields>
<field name="starting_count">starting_count + 1</field>
<field name="positionname">@positionname</field>
</updatefields>
</form>

Example with datetime fields

Copy Code
<form>
<updatefields>
<field name="updateDatetime">GETUTCDATE()</field>
<field name="futureUpdateDatetime" convertToUtc="true">DATEADD(day, 1, @otherDatetimeField)</field>
</updatefields>
</form>
  • This tag is related to the <insertfields> tag.

  • This tag only supports the following types of fields:

    • nvarchar

    • varchar

    • ntext

    • text

    • nvarcharmax

    • datetime