Fields – Period

A period is used to establish a date range during which events may have occurred, or to specify a time period that may or may not be associated with a date.

When using a display type that includes a time portion, the selected value will be in your local time-zone, then converted to UTC when saved. When reading the saved value from the database the value will be converted from UTC into your machines local time-zone.

This can be displayed as a set of dates, times, or a combined datetime control depending on what level of detail is needed. A Show Elements field will be used to indicate which of the potential controls should be used for this field.

This is what the field will look like in a form:

A screenshot of the period field in trellispark, showing the blue label above a pair of date fields labeled as the Start and End of the period.

Below is an example of the field definition for a period field:

A screenshot of the field creation process of a period field in trellispark.

The only additional fields for this field are for specifying default values. The start and end default values are specified individually.

The Custom Data Format allows you to specify the format for how the data will be displayed to the user if you don’t like the default. This is also useful to skip some input steps that are not needed such as the seconds portion on the time.

A default value can also be specified by picking a Default Value Type. Below are the available types and options you’re given per selection.

  • Current DateTime
    • This option will set the default value to the date time that the instance the field is on is created. Two additional fields will also be available to further customize the default value, Default Value Addition and Default Value Addition Specification. These two fields work together and are optional.
      • Default Value Addition can be used to specify a number to manipulate the default value in conjunction with Default Value Addition Specification. For example if you want the default value to be 5 days after the record was created then you’d set Default Value Addition to 5 and Default Value Addition Specification to Day(s). This field supports negative values and if you don’t want any addition then set the value to 0.
      • Default Value Addition Specification is used to specify how the Default Value Addition field will be applied. This field is only used when Default Value Addition is not 0.
  • Specific DateTime
    • This option will display a Default Value field where you can specify the exact date time that will be used.
  • Target Result
    • This option will display a Target Information field where you can specify a target call and the result returned will be the default value.
  • No Default Value
    • This option will not apply a default value to this field.

IMPORTANT NOTE: When specifying a default value only the type specified in Show Elements will be used. For example, if Show Elements equals Time, only the time portion of my default value will be used.

Updated on December 11, 2023

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support

Leave a Comment