User Manual

Create Custom Actions

30/7/25
Create Custom Actions

When developing applications on the Kuika platform, you can create Custom Actions using SQL queries to increase the functionality of the application. These actions allow you to provide a dynamic experience to the user by customizing the functioning of your application. In this course, you will learn step by step how to create Custom Actions, integrate them into screens and apply them to elements.

This training content consists of the following topics:

  1. Creating Custom Actions with SQL Editor in Datasources Module
  2. Creating SQL Action with Artificial Intelligence Assistant in UI Design Module
  3. Using DECLARE Function in SQL Editor

Create Custom Actions with SQL Editor in Datasources Module

In Kuika you can create custom actions and integrate them into your screens. In the Datasources module, you can view and manage existing data sources, actions and tables.

Description:

  1. Log in to the Kuika platform and open your project from the Apps screen.
  2. Open the Datasources module from the left menu.
  1. Click the + icon next to the Actions tab.
  2. Select New SQL Action from the drop-down menu.

To organize custom actions, you can create a folder and store the actions in this folder.

Example Scenario: Department List Action

Objective: To create an action that lists the departments in the personnel list in the application.

  1. Create a table named Department.
  2. Add the custom action named Select Department List.
  3. Write the following query in SQL Editor:
SELECT * FROM DepartmentWHERE DepartmentName LIKE @searchFor OR @searchFor IS NULL OR @searchFor =ORDER BY DepartmentName;
  1. Test the query by clicking the TEST button.
  2. Create the custom action by clicking the CREATE button.
  1. You can view, edit or delete the action created in the left panel with the Edit button.

Custom actions used in the related module cannot be deleted without removing them from the module they are related to. In this case, the system may display an error message.

Create SQL Action with Artificial Intelligence Assistant in UI Design Module

You can create custom actions in Kuikada via UI Design or Datasources modules.

Steps:

  1. Open the UI Design module.
  2. Open the Custom Actions panel and select SQL Action.
  3. Specify the action name and write your query in SQL Editor.

Creating SQL Queries

Kuika allows you to quickly add basic SQL queries:

  • Add Select Query: List records in a table.
  • Add Select By Id Query: Pull data based on a specific ID.
  • Add Save Query: Insert or update data.
  • Add Delete Query: Delete a specific record.
  • Add Search By Keyword Query: Search data by keyword.
  • Add Search With Pagination Query: Search data with pagination.

SQL Query Generation with Artificial Intelligence Assistant

  1. Click on the Generate with AI button.
  2. Select the table and enter the query description.
  3. Add the generated query to the SQL Editor.

Example Command:Create a query that lists only active departments.”

Testing and Saving SQL Queries

  1. Run the query with the TEST button in the upper right corner.
  2. Save the action by pressing the CREATE button.

Using DECLARE Function in SQL Editor

In Kuika SQL Editor, you can define variables with the DECLARE command.

General DECLARE Format

DECLARE @variable_name data_type;

It's here,

  • @variable_name: Variable name,
  • data_type: SQL data type (e.g. nvarchar, int, bit).

Example Uses

1. Variable Definition and Data Assignment

DECLARE @top1Product nvarchar(256);SELECT TOP 1 @top1Product = productName FROM table_name;

2. Row Count Calculation

DECLARE @rowCount int;SET @rowCount = (SELECT COUNT(Id) FROM table_name);

Using DECLARE with Artificial Intelligence

  1. Press the Generate with AI button.
  2. Enter a command to create the DECLARE function that suits your needs.

Example Command:Create a DECLARE command that lists only active departments.”

SQL Action Parameters

The following system parameters can be used when creating a SQL Action in Kuika:

Table Example
Parameter Description
@currentpage Represents the page number.
@pagesize Determines the number of records returned per page.
@kuikausername Represents the name of the logged-in user on Kuika.
@kuikauserid Represents the user's identity (GUID).

Using these parameters you can create paging, user-based data filtering and dynamic SQL queries. Especially when working with large data sets, you can optimize your queries by dividing the data into pages with @currentpage and @pagesize parameters .

Other Related Content

No items found.

Glossary

No items found.

Alt Başlıklar