<insertfields>
The <insertfields> tag is an auto insert tag that allows you to automatically populate a board field when a new record is created and saved. It can be populated with data from one or more fields. For example, you can implement a running history of comments or status changes.
-
This tag is only used in input views.
-
Although this tag captures values, it does not render a visible user interface input element.
-
There can only be one <insertfields> tag in an input view.
-
The tag must reside within a standard HTML <form> tag.
-
It can only have <field> tags within it.
| 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>
<insertfields>
<field name="starting_count">0</field>
<field name="positionname">@positionname</field>
</insertfields>
</form>
Example with datetime fields
Copy Code
<form>
<insertfields>
<field name="insertDatetime">GETUTCDATE()</field>
<field name="futureUpdateDatetime" convertToUtc="true">DATEADD(day, 1, @otherDatetimeField)</field>
</insertfields>
</form>
-
The tag is related to the <updatefields> tag.
-
The tag supports the following types of fields:
-
nvarchar
-
varchar
-
ntext
-
text
-
nvarcharmax
-
datetime
-