Skip to main content

On Click

Last updated 27/03/2026

Overview​

The On Click event is a client-side event that executes when a user clicks a button. It is only available for fields with a _Button display type, allowing the application to respond immediately when the button is clicked.

How it Works​

When a user clicks the button:

  1. The On Click event executes.
  2. Any associated logic runs instantly on the client-side.
tip
If you require a backend function to work with the On Click event, you can call it from the frontend using Five's
executeFunction()
.

Use Cases​

  • Trigger actions
  • Perform calculations and validations on demand
  • Navigate a user to another part of the application

Example​

This function executes when the user clicks the button and triggers an action to display the Products list.

JavaScript
Select the Products
function SelectProducts(five, context, result) {
five.selectAction('Products');
return five.success(result);
}