Prefill date fields

In Flowfinity, you can prefill fields using formulas. Calculating a default value can reduce errors, save time, and improve accuracy.

Example

An environmental services organization uses an application to assign and complete site inspections.

Repeat inspections are required within six months. However, depending on the inspection result, an inspection may be due sooner. As a result, the app should generate a prefilled date but allow a user to amend this as necessary.

Flowfinity - Prefill date fields

Instructions

  1. Customize the application
  2. Select the date field labeled 'Inspection Completed.'
    Flowfinity - Prefill date fields
  3. 'Static value' is selected as the default value for any data field, amend this to a 'calculated value.'
    Flowfinity - Prefill date fields
  4. Press Ctrl+Space to activate the formula auto-completion menu, alternatively complete the formula from memory.
    Flowfinity - Prefill date fields
  5. Complete the formula as follows:'currentdatetime()'
    Flowfinity - Prefill date fields
  6. Save the form.
  7. Select the date field labeled Suggested Next Inspection.
  8. Repeat step 3, change the default value to a 'calculated value.'
    Flowfinity - Prefill date fields
  9. Press Ctrl+Space and select the 'addmonth' formula.
  10. Complete the formula as follows:'addmonth(InspectionCompleted, 6)'
    Flowfinity - Prefill date fields
  11. Publish the application.

The application will now display a prefilled date in both date fields, allowing a user to make changes to the date if necessary.

Flowfinity - Prefill date fields
Flowfinity - Prefill date fields