Focus
Table of Contents
Overview
In a form, the focus (the insertion pointer or cursor) can be positioned on any required field using the Focus task either while loading the form or during user input in the form events.
Once the user starts filling in the form, the focus can be moved from one field to another required field. Likewise, a form can have multiple focus tasks, which ensures quick and efficient data entry.
Syntax
To focus a form field in a main form workflow
To focus any field in a row in subform field's workflow
Param | Explanation |
<field_link_name> & <subform_field_link_name> | Link name of the field that needs to be focused. Points to keep in mind for this parameter:
|
Unsupported Field Types
This task is only applicable for the fields that collect data from the application users.
Focus cannot be used for the below fields:
Formula | Auto number | Blueprint | Notes |
Section Field | AI fields like Prediction | Stateless form buttons | System fields (eg: Added Time and ID) |
This task can be used in the following events
When a record is Created | ||
Workflow event | For form fields | For subform fields |
On Load | Yes | No |
On Validate | No | No |
On Success | No | No |
On User input | Yes | No |
On user input of a subform field | No | Yes |
Subform on add row | No | Yes |
Subform on delete row | No | No |
When a record is Created or Edited | ||
Workflow event | For form fields | For subform fields |
On Load | Yes | No |
On Validate | No | No |
On Success | No | No |
On User input | Yes | No |
On user input of a subform field | No | Yes |
Subform on add row | No | Yes |
Subform on delete row | No | No |
When a record is Edited | ||
Workflow event | For form fields | For subform fields |
On Load | Yes | No |
On Validate | No | No |
On Success | No | No |
On User input | Yes | No |
On user input of a subform field | No | Yes |
On Update | No | No |
Subform on add row | No | Yes |
Subform on delete row | No | No |
When a record is Deleted | ||
Workflow event | For form fields | For subform fields |
On Validate | No | No |
On Success | No | No |
Other workflow events | ||
Workflow event | For form fields | For subform fields |
On a scheduled date | No | No |
During approval process | No | No |
During payment process | No | No |
In a Custom Function | No | No |
In an Action item in report | No | No |
In a Stateless form button-click | No | No |
Example 1
- When a form loads, the focus can be applied to the first field in the form. This ensures that the cursor is placed automatically on the first relevant field for immediate input, once the user opens the form.
focus Name;
Example 2
Let's say there is a subform for entering payment details, which has a dropdown to select the payment mode. When the user chooses "Card" option as the payment mode, the cursor can be automatically shifted to the "Card Number" field for a better user experience.
Note: Since this is written in a subform workflow, the keyword "row" has to be used to refer the subform field.
if(Payment_Mode == "Card") { focus row.Card_Number; }
Example 3: Data entry through scanner
- Consider an accounting department that uses scanners to input their stack of invoices. As each invoice is scanned, the focus task can automatically position the cursor in the relevant field, such as the invoice number. Users can quickly confirm or edit the extracted data before moving on to the next scanned invoice.
if(<condition>) { focus invoice; } else { focus next_field; }
See How It Works
- Let's consider a scenario in a retail environment, where a web-based barcode scanner is being used to process inventory. Assume that you've built an application named Inventory Management in which the scanned data is stored. Earlier, you'd have manually typed the product details into a subform, one by one. Using the focus task, after the completion of every scan, you can configure a workflow to automatically set the focus on the desired input field for the next scan. This eliminates the need to manually select the required field between each scan.