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.
Instructions
- Customize the application
- Select the date field labeled 'Inspection Completed.'
- 'Static value' is selected as the default value for any data field, amend this to a 'calculated value.'
- Press Ctrl+Space to activate the formula auto-completion menu, alternatively complete the formula from memory.
- Complete the formula as follows:'currentdatetime()'
- Save the form.
- Select the date field labeled Suggested Next Inspection.
- Repeat step 3, change the default value to a 'calculated value.'
- Press Ctrl+Space and select the 'addmonth' formula.
- Complete the formula as follows:'addmonth(InspectionCompleted, 6)'
- 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.