What is an Event?

An event in Pragmatic Studio is a block of code that executes at a specific moment within a form. Unlike data sources, which return data to be displayed in the form, events are not designed to return data; instead, they execute specific actions in response to certain execution moments within the form.

The main difference between an event and a data source is that while the data source is designed to return an array of data for use in the form, the event is executed to perform actions without the need to return data.

Events can execute JavaScript functions, perform queries or insertions into MongoDB or SQL databases. They can also use parameters to retrieve data from the form if necessary.

Events main page

Components

Event List

In this section, users can view all previously defined events. Each event is presented clearly and in an organized manner, making it easy to identify and select the desired event for viewing or modification.

Search Filter

Users can use a search filter by event name to quickly find specific events.

Creating a New Event

To create a new event, users simply need to click the create button located in the interface. This will open an interface that guides them through the process of designing and configuring the new event, allowing customization according to their specific needs.

Events can be created to process data either in an SQL database, a MongoDB database, or using a JavaScript function.



Modifying Events

Users also have the ability to edit existing events as needed. They can access the edit options for a specific event by clicking on it in the event list and making the necessary modifications. To learn more about how to modify an event, click here.