Getting started

Walkthrough Guides

CafeX Apps


Using CafeX Collaborate App


Managing CafeX

Integrating CafeX


CafeX Apps

Using Event Handlers

Modified on Mon, 18 Sep 2023 at 11:38 AM


Understanding Event Handlers

You use Event Handlers to make things happen after a specific event occur in your App.

You add Event Handlers to the following Components:

  • Buttons
  • Table fields
  • Table row selection
  • Forms

You set an event type, depends on the type of Component, so it may be a button click, or a table record selection.

The following operations are available to you:

  • Select a Tab
  • Raise an Audit Event
  • Select a Page 
  • Open a link
  • Set a Variable


These types of operation are very common in App development, and provide you with a way to make your App interactive. 

Setting a Variable

If you configure an Event handler to set a Variable Data Set, the expression only evaluates if that event occurs.  This means that if you expression references another Data Set, it does not automatically reevaluate  if that Data Set updates.

To add an event handler that sets a Variable: 

  1. Click on your Component.
  2. Go to: Configuration > Event handlers.
  3. Click Add handler.
  4. Add an event handler with the following parameters:
Handler NameProvide a description of the event
Event typeSelect an event type
ActionSet a variable
Variable to SetSelect an existing Variable
Value to SetEnter an expression. See: Understanding mustaches and expressions.

Now, if an App User raises the event, the expression of the variable evaluates. If the variable value changes:

  • Components that use the Variable Data Set obtain the new value of the variable are redrawn. So there is no need to apply any changes to your text component.
  • Data Sets that use the Variable re-evaluate.

Raising Audit events

App Studio provides you with a simple way to record App usage. You record events for important actions that Users take in your App. As necessary, you create reports on App usage, or behavioral patterns within the Apps that you write. As an App Builder, you can write audit events from the App Studio. CafeX provides an audit log that you can retrieve data from using an API. 


To raise an audit event, add an event handler, and set the Action to Raise an audit event.


See also: Accessing Audit Information Programmatically


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article