Skip to main content

Custom Forms

Custom forms adapt the forms for entering data in DYCE Connect to a company's own processes. A form decides which standard fields are shown and how they are arranged, separately for desktop and mobile, and it can add the company's own custom fields.

There are two form types:

Form typeApplies to
Time recording formThe time recording form in DYCE Time Tracking, in the time tracking dialog of DYCE for Jira and in the advanced dialog of DYCE for Azure DevOps.
Work order formThe card of an existing work order in DYCE Connect.

Values of custom fields are stored with the time recording or work order. Time recording templates keep the values of custom fields as well.

Creating, editing and deleting custom forms requires the Admin role (see Roles and permissions).

Which form a user gets​

For each form type, a user works with one form:

  1. The form assigned to the user, either by an admin or by the user in their settings. This can be a custom form or a DYCE standard form.
  2. Without an assignment, the company default: the custom form of this type marked as Default.
  3. Without a company default, the DYCE standard form applies. This is All for time recordings and Standard work order card for work orders.

Users without an assignment always follow the current company default, also when the default changes. Deleting a custom form returns its users to the default form.

If either the desktop or mobile layout is invalid, the DYCE standard form is shown and the user sees the message Custom form "…" is invalid. Both layouts should be checked before the form is assigned.

Managing custom forms​

In the Administration section, the Custom Forms page lists all custom time recording and work order forms with their Name, Type and whether they are the Default.

  • New creates a form (see Creating a form).
  • Edit in the context menu opens the form editor.
  • Duplicate in the context menu opens the editor with a copy of the form: same type, same desktop and mobile layout, the name <Name> (copy) and Default switched off. The copy is only created when it is saved, and the original form stays unchanged.
  • Delete in the context menu deletes a form; Remove selected custom forms in the toolbar deletes all selected forms. Their users return to the default form.

Creating a form​

New opens the dialog New custom form. It asks Which form do you want to customize?:

  • Time recording form
  • Work order form

Continue opens the form editor with a copy of the DYCE standard form of the selected type. The name field has the focus, so the form can be named right away.

The form editor​

The editor shows the following settings and a preview of the form:

  • Name – the name shown in the form selection. A name is required.
  • Default – users without an assigned form of the same type use this form. Only one custom form per type can be the default; switching it on for one form switches it off for the previous default.
  • Desktop and Mobile – each form has a desktop and a mobile layout, both written in JSON. The mobile layout is used on screens smaller than a laptop.
  • Desktop preview and Mobile preview – show the form as it is configured.

The toolbar above the JSON editor helps with editing:

  • The insert buttons add a new element at the cursor position: Row, Wrapper and Component in time recording forms; Tab, Section and Component in work order forms. Component offers the custom field types Text field, Number field, Text area, Select and Switch.
  • Import a JSON file and Export to a JSON file move a layout between forms or companies. A JSON file can also be dropped onto the editor.
  • Documentation opens this page.

The editor checks both layouts while typing and blocks saving if either has errors, such as a default component used twice or a missing property. A warning about a missing German translation still allows saving as long as the English label is present.

Create saves a new or duplicated form and closes the editor. Save updates an existing form and keeps the editor open. Close asks before unsaved changes are discarded.

Example: Add a Category field to a time recording form​

This example adds a Category dropdown with Support and Maintenance to a time recording form for one test user.

  1. In Administration, open Custom Forms and select New. Choose Time recording form, then Continue. Enter Time recording with category as the Name and leave Default off.

  2. On the Desktop tab, find "type": "description" under main → rows → wrappers → components. Place the cursor inside that component and select Component → Select. The editor inserts a dropdown after the description in the same components array.

  3. In the new component, set property to category and label to Category. Replace the generated options array with the following and keep the generated tabIndex. Check that Category appears in Desktop preview.

    [
    { "value": "support", "label": "Support" },
    { "value": "maintenance", "label": "Maintenance" }
    ]
  4. Repeat the change on the Mobile tab and check Mobile preview. Use the same property and option values in both layouts so both read and write the same values. Select Create.

  5. In the user list, show Time Recording Form and double-click the test user's cell in that column. Select Time recording with category under Custom. As the test user, open a new time recording and check that Category offers Support and Maintenance.

Assigning forms to users​

The form selection groups the available forms:

GroupContent
Company defaultDefault form (<name>) – no assignment. The user follows the company default, whatever it is. Without a company default, the name shows the DYCE standard form.
DYCE standardDYCE standard forms include All, Compact, Simple and Dynamic for time recordings, and Standard work order card for work orders.
CustomThe custom forms of this type.

In the user list​

On the Users page in the Administration section, the columns Time Recording Form and Work Order Form show and change the form of each user. Both columns are hidden by default and can be shown through the column selection of the list. A user without an assignment shows Default form (<name>) in grey.

For several users at once​

After selecting several users in the user list, the pencil button (Edit roles and forms of all selected users.) opens the dialog Edit user roles and forms. Besides the roles, its Forms section has the fields Time recording form and Work order form. Both start with Keep unchanged, which leaves the users' forms as they are.

  • Selecting a form assigns it to all selected users. The line below the field says how many users are affected, for example Form will be changed for 2 user(s) of 3. Users who already have this form are not counted.
  • Selecting the default form removes the assignment of all selected users: Users will get the default form: 3 user(s) of 3.

In the user settings​

Each user can choose their own time recording form in the user settings, under Time Tracking Form. Work order forms can only be assigned by an admin; the user settings don't offer them.

Time recording form reference​

A time recording form layout can contain two sections. The snippets with ... in this reference illustrate the structure and need actual values before they can be used in the editor.

{
"main": { "rows": [...] },
"more": { "rows": [...] }
}
  • main – the primary section of the form.
  • more – a secondary section at the bottom of the form. It is collapsed by default and is expanded and collapsed with the show more button.

Row​

Each section contains an array of rows.

{
"wrappers": [...],
"grid": { ... },
"sx": { ... },
"autoFocus": "start"
}
  • wrappers – one or more wrappers that group the components of the row.
  • grid – the grid configuration of the row.
  • sx – additional styles for the row, see the Material UI documentation.
  • autoFocus – the field to focus when the desktop form opens. Use the type for a supported default field or customFields.<property> for a custom field that supports autofocus.
  • collapsible – renders the row as an accordion with the settings header (title), infoText (shows all field values in the collapsed header), infoIcon (shows the budget bar and the activity's monetization icon in the header) and initialOpen (open by default). collapsible is deprecated and will be removed in a future version.

Wrapper​

Wrappers group the components inside a row.

{
"components": [...],
"grid": { ... },
"sx": { ... }
}
  • components – the fields and UI elements of the wrapper.
  • grid – the grid configuration of the wrapper.
  • sx – additional styles for the wrapper.

Components​

Components are the fields of the form, or UI elements that show the data they are tied to. type selects the component.

Default components – each can be used only once per form:

start, end, duration, break, description, customer, job, jobTask, activity, workOrder, budgetBar, date, durationBillable, nonBillableReason, surchargeDisabled, additionalServiceJobPlanningLine

Custom components – see Custom fields: textField, numberField, textarea, select, switch

Additional settings for components in time recording forms:

  • tabIndex – the keyboard focus order of the fields. The minimum is 2; the values 50 to 60 are reserved for internal elements. In the DYCE standard forms, each tabIndex appears only once, and the components are listed in the order they appear on screen.
  • grid and sx – as for rows and wrappers.

A time recording form can contain at most 50 components.

Work order form reference​

A work order form layout consists of tabs:

{
"tabs": [...]
}

Each tab becomes a tab of the work order card. The layout must contain at least one tab.

Tab​

{
"id": "general",
"label": { "en": "General", "de": "Allgemein" },
"sections": [...],
"sidebar": [...]
}
  • id – unique identifier of the tab. Required; each tab needs a different id.
  • label – title in the tab bar. Required; plain text or translated.
  • sections – the sections in the main area of the tab.
  • sidebar – the sidebar components to the right of the sections. Without a sidebar, the tab has none. On mobile, the sidebar opens in a full-screen dialog through a button.

Section​

Sections group the components inside a tab. Each section is shown as a titled block.

{
"label": { "en": "Details", "de": "Details" },
"components": [...],
"grid": { ... },
"sx": { ... }
}
  • label – section title. Optional; plain text or translated.
  • components – the fields and UI elements of the section.
  • grid – the grid configuration of the section. By default, a section has one column ("templateColumns": "1fr"), so its components are stacked.
  • sx – additional styles for the section.

A section is hidden if none of its components has anything to show, for example a section that only contains parentReference for a work order without a parent work order.

Components​

type selects the component.

Default components – each can be used only once in the whole layout, across all tabs. Their labels are fixed. The layout requires title before it can be saved.

title, description, internalComment, resolution, type, status, billingDisposition, completed, locked, customerToJob, billingWorkOrder, budgetType, workOrderLines, originalEstimate, remainingEstimate, timeRecordings, resource, location, area, sprint, scheduled, events, externalReference, parentReference, link

Custom components – see Custom fields: textField, numberField, textarea, select, switch

A work order form can contain at most 100 components.

Sidebar components​

Sidebar components show summary information about the work order next to the sections of a tab:

overview, budgetSummary, planningSummary, history

Each sidebar component can be used only once per tab, but the same sidebar component can be used in several tabs. Sidebar components can't be placed in sections, and section components can't be placed in the sidebar.

Custom fields​

Custom components add fields of the company's own to time recordings and work orders. They work the same in both form types.

Custom field values are synchronized in both directions between DYCE Connect and Business Central. A synchronized value appears in the form when a field has the matching property.

The same rule applies to values copied from Jira by the DYCE - Set Custom Work Order Field automation action. For example, to display a Jira text field with the ID customfield_10042 on a work order card, add a textField with that ID as its property. See Custom Fields from DYCE Connect for details on stored values and synchronization.

TypeFielddefaultValue
textFieldSingle-line textText
numberFieldNumberNumber
textareaMulti-line textText
selectSelection from a list of optionsOne of the values of options
switchYes/no switchtrue or false

Settings of custom components:

  • property – the key under which the value is stored. It is required and must be unique within each layout. Use the same key for the same field on desktop and mobile. To rename a field on screen, change label and keep property so the field continues to read the values already saved with that key.
  • label – the field label, as plain text or translated.
  • defaultValue – the initial value if the record has no value stored under this key. A select without an explicit default starts with the first option.
  • required – when set to true in a time recording form, an empty value prevents the time recording from being saved. Custom fields on work order cards are always optional.
  • options – required for select. Each option has a unique value that is stored with the record and can have a plain-text label.
  • allowNegative and allowDecimal – allow negative or decimal numbers in a numberField.

Example of a select field:

{
"type": "select",
"property": "category",
"label": { "en": "Category", "de": "Kategorie" },
"defaultValue": "internal",
"options": [
{ "value": "internal", "label": "Internal" },
{ "value": "billable", "label": "Billable" },
{ "value": "warranty", "label": "Warranty" }
]
}

Labels and translations​

Labels of custom components, and in work order forms also of tabs and sections, are either plain text or translated.

  • Plain text is shown as written, whatever language the user has chosen: "label": "Reference"
  • Translated labels are an object with a language code per translation: "label": { "en": "Reference", "de": "Referenz" }

The supported language codes are en (English) and de (German). A translated label must contain the English translation, which is used whenever the user's language is missing.

Grid configuration​

Rows, wrappers, sections and components arrange their content with a grid setting based on CSS Grid:

{
"colSpan": 2,
"rowSpan": 1,
"colStart": 1,
"rowStart": 2,
"templateColumns": "250px 1fr auto",
"templateRows": "repeat(2, 1fr)"
}
  • colSpan and rowSpan – the number of columns and rows the element spans.
  • colStart and rowStart – the column and row in which the element begins.
  • templateColumns and templateRows – the columns and rows of the grid, as a space-separated list of sizes.

Example: a work order section with two columns, in which the title and the description span both columns:

{
"label": "Details",
"grid": { "templateColumns": "1fr 1fr" },
"components": [
{ "type": "title", "grid": { "colSpan": 2 } },
{ "type": "status" },
{ "type": "type" },
{ "type": "description", "grid": { "colSpan": 2 } }
]
}

The CSS Grid guide explains the layout options in detail.